5. Boost — selection, builders, block brackets, conveniences
The hand-written ergonomic core: device/queue selection helpers, combined
builders that fold several Vulkan objects into one owner
(build_offscreen_target, create_host_buffer), block brackets
(run_cmd_sync, record_render_pass, map_memory_to_array) that pair a
begin/end or map/unmap around a block, and small conveniences (full_area,
clear_color). This is the layer the examples are written against.
5.1. Structures
- SpecConstantValue
struct SpecConstantValue
- OffscreenTarget
struct OffscreenTarget
- OffscreenDepth
struct OffscreenDepth
- HostBuffer
struct HostBuffer
- AddressBuffer
struct AddressBuffer
- ShaderBindingTable
struct ShaderBindingTable
- AccelInstance
struct AccelInstance
- AccelStructure
struct AccelStructure
5.2. Device selection
- find_memory_type(phys: VkPhysicalDevice; type_bits: uint; want: VkMemoryPropertyFlags ): uint
def find_memory_type (phys: VkPhysicalDevice; type_bits: uint; want: VkMemoryPropertyFlags) : uint
- Arguments:
phys : VkPhysicalDevice
type_bits : uint
want : VkMemoryPropertyFlags
- select_graphics_queue_family(phys: VkPhysicalDevice ): uint
def select_graphics_queue_family (phys: VkPhysicalDevice) : uint
- Arguments:
phys : VkPhysicalDevice
- select_physical_device(instance: Instance ): VkPhysicalDevice
def select_physical_device (instance: Instance) : VkPhysicalDevice
- Arguments:
instance : Instance
5.3. Instance & device
create_device (phys: VkPhysicalDevice; queue_family: uint) : Device
create_device (phys: VkPhysicalDevice; queue_family: uint; extensions: array<string>) : Device
create_device_descriptor_indexing (phys: VkPhysicalDevice; queue_family: uint) : Device
create_device_draw_parameters (phys: VkPhysicalDevice; queue_family: uint) : Device
create_instance (application_name: string = “”; api_version: uint = 0x0) : Instance
create_instance (application_name: string; api_version: uint; extensions: array<string>) : Instance
device_extension_available (phys: VkPhysicalDevice; name: string) : bool
get_device_queue (device: Device; queue_family: uint; index: uint) : VkQueue
5.3.1. create_device
- create_device(phys: VkPhysicalDevice; queue_families: array<uint>; extensions: array<string>; features2: VkPhysicalDeviceFeatures2 ): Device
def create_device (phys: VkPhysicalDevice; queue_families: array<uint>; extensions: array<string>; var features2: VkPhysicalDeviceFeatures2) : Device
- Arguments:
phys : VkPhysicalDevice
queue_families : array<uint>
extensions : array<string>
features2 : VkPhysicalDeviceFeatures2
- create_device(phys: VkPhysicalDevice; queue_family: uint ): Device
- create_device(phys: VkPhysicalDevice; queue_family: uint; extensions: array<string> ): Device
- create_device(phys: VkPhysicalDevice; queue_family: uint; extensions: array<string>; features12: VkPhysicalDeviceVulkan12Features ): Device
- create_device(phys: VkPhysicalDevice; queue_family: uint; extensions: array<string>; features13: VkPhysicalDeviceVulkan13Features ): Device
- create_device(phys: VkPhysicalDevice; queue_family: uint; extensions: array<string>; features2: VkPhysicalDeviceFeatures2 ): Device
- create_device(phys: VkPhysicalDevice; queue_family: uint; extensions: array<string>; features: VkPhysicalDeviceFeatures ): Device
- create_device(phys: VkPhysicalDevice; queue_family: uint; extensions: array<string>; meshFeatures: VkPhysicalDeviceMeshShaderFeaturesEXT ): Device
- create_device_descriptor_indexing(phys: VkPhysicalDevice; queue_family: uint ): Device
def create_device_descriptor_indexing (phys: VkPhysicalDevice; queue_family: uint) : Device
- Arguments:
phys : VkPhysicalDevice
queue_family : uint
- create_device_draw_parameters(phys: VkPhysicalDevice; queue_family: uint ): Device
def create_device_draw_parameters (phys: VkPhysicalDevice; queue_family: uint) : Device
- Arguments:
phys : VkPhysicalDevice
queue_family : uint
5.3.2. create_instance
- create_instance(application_name: string = ""; api_version: uint = 0x0 ): Instance
def create_instance (application_name: string = “”; api_version: uint = 0x0) : Instance
- Arguments:
application_name : string
api_version : uint
- create_instance(application_name: string; api_version: uint; extensions: array<string> ): Instance
- device_extension_available(phys: VkPhysicalDevice; name: string ): bool
def device_extension_available (phys: VkPhysicalDevice; name: string) : bool
- Arguments:
phys : VkPhysicalDevice
name : string
- get_device_queue(device: Device; queue_family: uint; index: uint ): VkQueue
def get_device_queue (device: Device; queue_family: uint; index: uint) : VkQueue
- Arguments:
device : Device
queue_family : uint
index : uint
- instance_extension_available(name: string ): bool
def instance_extension_available (name: string) : bool
- Arguments:
name : string
5.4. Shaders & pipelines
5.4.1. create_compute_pipeline
- create_compute_pipeline(device: Device; layout: PipelineLayout; shader: ShaderModule; entry: string = "main" ): Pipeline
def create_compute_pipeline (device: Device; layout: PipelineLayout; shader: ShaderModule; entry: string = “main”) : Pipeline
- Arguments:
device : Device
layout : PipelineLayout
shader : ShaderModule
entry : string
- create_compute_pipeline(device: Device; layout: PipelineLayout; shader: ShaderModule; spec: array<SpecConstantValue>; entry: string = "main" ): Pipeline
- create_graphics_pipeline_dyn(device: Device; color_format: VkFormat; depth_format: VkFormat; samples: VkSampleCountFlags; layout: PipelineLayout; vert: ShaderModule; frag: ShaderModule; width: int; height: int; vertex_bindings: array<VkVertexInputBindingDescription>; vertex_attributes: array<VkVertexInputAttributeDescription>; depth_test_enable: bool = true; depth_write_enable: bool = true; depth_compare_op: VkCompareOp = vulkan::VkCompareOp.LESS_OR_EQUAL; dynamic_viewport: bool = false ): Pipeline
def create_graphics_pipeline_dyn (device: Device; color_format: VkFormat; depth_format: VkFormat; samples: VkSampleCountFlags; layout: PipelineLayout; vert: ShaderModule; frag: ShaderModule; width: int; height: int; var vertex_bindings: array<VkVertexInputBindingDescription>; var vertex_attributes: array<VkVertexInputAttributeDescription>; depth_test_enable: bool = true; depth_write_enable: bool = true; depth_compare_op: VkCompareOp = vulkan::VkCompareOp.LESS_OR_EQUAL; dynamic_viewport: bool = false) : Pipeline
- Arguments:
device : Device
color_format : VkFormat
depth_format : VkFormat
samples : VkSampleCountFlags
layout : PipelineLayout
vert : ShaderModule
frag : ShaderModule
width : int
height : int
vertex_bindings : array< VkVertexInputBindingDescription>
vertex_attributes : array< VkVertexInputAttributeDescription>
depth_test_enable : bool
depth_write_enable : bool
depth_compare_op : VkCompareOp
dynamic_viewport : bool
- create_graphics_pipeline_simple(device: Device; render_pass: RenderPass; layout: PipelineLayout; vert: ShaderModule; frag: ShaderModule; width: int; height: int; dynamic_viewport: bool = false ): Pipeline
def create_graphics_pipeline_simple (device: Device; render_pass: RenderPass; layout: PipelineLayout; vert: ShaderModule; frag: ShaderModule; width: int; height: int; dynamic_viewport: bool = false) : Pipeline
- Arguments:
device : Device
render_pass : RenderPass
layout : PipelineLayout
vert : ShaderModule
frag : ShaderModule
width : int
height : int
dynamic_viewport : bool
- create_graphics_pipeline_v3d(device: Device; render_pass: RenderPass; layout: PipelineLayout; vert: ShaderModule; frag: ShaderModule; width: int; height: int; vertex_bindings: array<VkVertexInputBindingDescription>; vertex_attributes: array<VkVertexInputAttributeDescription>; depth_test_enable: bool = true; depth_write_enable: bool = true; depth_compare_op: VkCompareOp = vulkan::VkCompareOp.LESS_OR_EQUAL; dynamic_viewport: bool = false ): Pipeline
def create_graphics_pipeline_v3d (device: Device; render_pass: RenderPass; layout: PipelineLayout; vert: ShaderModule; frag: ShaderModule; width: int; height: int; var vertex_bindings: array<VkVertexInputBindingDescription>; var vertex_attributes: array<VkVertexInputAttributeDescription>; depth_test_enable: bool = true; depth_write_enable: bool = true; depth_compare_op: VkCompareOp = vulkan::VkCompareOp.LESS_OR_EQUAL; dynamic_viewport: bool = false) : Pipeline
- Arguments:
device : Device
render_pass : RenderPass
layout : PipelineLayout
vert : ShaderModule
frag : ShaderModule
width : int
height : int
vertex_bindings : array< VkVertexInputBindingDescription>
vertex_attributes : array< VkVertexInputAttributeDescription>
depth_test_enable : bool
depth_write_enable : bool
depth_compare_op : VkCompareOp
dynamic_viewport : bool
- create_pipeline_layout(device: Device ): PipelineLayout
def create_pipeline_layout (device: Device) : PipelineLayout
- Arguments:
device : Device
5.4.2. create_shader_module
- create_shader_module(device: Device; code: array<uint8> ): ShaderModule
def create_shader_module (device: Device; var code: array<uint8>) : ShaderModule
- Arguments:
device : Device
code : array<uint8>
- create_shader_module(device: Device; code: array<uint> ): ShaderModule
5.5. Mesh shaders
- create_device_mesh_shader(phys: VkPhysicalDevice; queue_family: uint ): Device
def create_device_mesh_shader (phys: VkPhysicalDevice; queue_family: uint) : Device
- Arguments:
phys : VkPhysicalDevice
queue_family : uint
- create_mesh_pipeline(device: Device; render_pass: RenderPass; layout: PipelineLayout; task: ShaderModule; mesh: ShaderModule; frag: ShaderModule; width: int; height: int; dynamic_viewport: bool = false; enable_depth: bool = false ): Pipeline
def create_mesh_pipeline (device: Device; render_pass: RenderPass; layout: PipelineLayout; task: ShaderModule; mesh: ShaderModule; frag: ShaderModule; width: int; height: int; dynamic_viewport: bool = false; enable_depth: bool = false) : Pipeline
- Arguments:
device : Device
render_pass : RenderPass
layout : PipelineLayout
task : ShaderModule
mesh : ShaderModule
frag : ShaderModule
width : int
height : int
dynamic_viewport : bool
enable_depth : bool
- mesh_shader_supported(phys: VkPhysicalDevice ): bool
def mesh_shader_supported (phys: VkPhysicalDevice) : bool
- Arguments:
phys : VkPhysicalDevice
5.6. Hardware ray tracing
- build_blas(device: Device; phys: VkPhysicalDevice; pool: CommandPool; queue: VkQueue; vertices: array<float3>; indices: array<uint> ): AccelStructure
def build_blas (device: Device; phys: VkPhysicalDevice; pool: CommandPool; queue: VkQueue; var vertices: array<float3>; var indices: array<uint>) : AccelStructure
- Arguments:
device : Device
phys : VkPhysicalDevice
pool : CommandPool
queue : VkQueue
vertices : array<float3>
indices : array<uint>
- build_shader_binding_table(device: Device; phys: VkPhysicalDevice; pipeline: Pipeline; miss_count: uint; hit_count: uint ): ShaderBindingTable
def build_shader_binding_table (device: Device; phys: VkPhysicalDevice; pipeline: Pipeline; miss_count: uint; hit_count: uint) : ShaderBindingTable
- Arguments:
device : Device
phys : VkPhysicalDevice
pipeline : Pipeline
miss_count : uint
hit_count : uint
- build_tlas(device: Device; phys: VkPhysicalDevice; pool: CommandPool; queue: VkQueue; instances: array<AccelInstance> ): AccelStructure
def build_tlas (device: Device; phys: VkPhysicalDevice; pool: CommandPool; queue: VkQueue; var instances: array<AccelInstance>) : AccelStructure
- Arguments:
device : Device
phys : VkPhysicalDevice
pool : CommandPool
queue : VkQueue
instances : array< AccelInstance>
- cmd_trace_rays(cmd: CommandBuffer; sbt: ShaderBindingTable; width: uint; height: uint; depth: uint = 0x1 )
def cmd_trace_rays (cmd: CommandBuffer; sbt: ShaderBindingTable; width: uint; height: uint; depth: uint = 0x1)
- Arguments:
cmd : CommandBuffer
sbt : ShaderBindingTable
width : uint
height : uint
depth : uint
- create_address_buffer(device: Device; phys: VkPhysicalDevice; size: uint64; usage: VkBufferUsageFlags; host_visible: bool ): AddressBuffer
def create_address_buffer (device: Device; phys: VkPhysicalDevice; size: uint64; usage: VkBufferUsageFlags; host_visible: bool) : AddressBuffer
- Arguments:
device : Device
phys : VkPhysicalDevice
size : uint64
usage : VkBufferUsageFlags
host_visible : bool
5.6.1. create_device_ray_tracing
- create_device_ray_tracing(phys: VkPhysicalDevice; queue_family: uint ): Device
def create_device_ray_tracing (phys: VkPhysicalDevice; queue_family: uint) : Device
- Arguments:
phys : VkPhysicalDevice
queue_family : uint
- create_device_ray_tracing(phys: VkPhysicalDevice; queue_family: uint; extra_extensions: array<string> ): Device
5.6.2. create_ray_tracing_pipeline
- create_ray_tracing_pipeline(device: Device; layout: PipelineLayout; raygen: ShaderModule; miss: ShaderModule; closest_hit: ShaderModule; max_recursion: uint = 0x1 ): Pipeline
def create_ray_tracing_pipeline (device: Device; layout: PipelineLayout; raygen: ShaderModule; miss: ShaderModule; closest_hit: ShaderModule; max_recursion: uint = 0x1) : Pipeline
- Arguments:
device : Device
layout : PipelineLayout
raygen : ShaderModule
miss : ShaderModule
closest_hit : ShaderModule
max_recursion : uint
- create_ray_tracing_pipeline(device: Device; layout: PipelineLayout; raygen: ShaderModule; miss: array<ShaderModule>; closest_hit: ShaderModule; max_recursion: uint = 0x1 ): Pipeline
- get_ray_tracing_properties(phys: VkPhysicalDevice ): VkPhysicalDeviceRayTracingPipelinePropertiesKHR
def get_ray_tracing_properties (phys: VkPhysicalDevice) : VkPhysicalDeviceRayTracingPipelinePropertiesKHR
- Arguments:
phys : VkPhysicalDevice
- get_ray_tracing_shader_group_handles(device: Device; pipeline: Pipeline; first_group: uint; group_count: uint; handle_size: uint ): array<uint8>
def get_ray_tracing_shader_group_handles (device: Device; pipeline: Pipeline; first_group: uint; group_count: uint; handle_size: uint) : array<uint8>
- Arguments:
- make_accel_instance(blas_address: uint64; custom_index: uint = 0x0; mask: uint = 0xff; sbt_record_offset: uint = 0x0; flags: uint = 0x0 ): AccelInstance
def make_accel_instance (blas_address: uint64; custom_index: uint = 0x0; mask: uint = 0xff; sbt_record_offset: uint = 0x0; flags: uint = 0x0) : AccelInstance
- Arguments:
blas_address : uint64
custom_index : uint
mask : uint
sbt_record_offset : uint
flags : uint
- rt_supported(phys: VkPhysicalDevice ): bool
def rt_supported (phys: VkPhysicalDevice) : bool
- Arguments:
phys : VkPhysicalDevice
- write_descriptor_acceleration_structure(device: Device; dset: DescriptorSet; binding: uint; tlas: AccelStructure )
def write_descriptor_acceleration_structure (device: Device; dset: DescriptorSet; binding: uint; tlas: AccelStructure)
- Arguments:
device : Device
dset : DescriptorSet
binding : uint
tlas : AccelStructure
5.7. Render passes
- create_render_pass_color_depth(device: Device; color_format: VkFormat; depth_format: VkFormat; color_final_layout: VkImageLayout = vulkan::VkImageLayout.TRANSFER_SRC_OPTIMAL ): RenderPass
def create_render_pass_color_depth (device: Device; color_format: VkFormat; depth_format: VkFormat; color_final_layout: VkImageLayout = vulkan::VkImageLayout.TRANSFER_SRC_OPTIMAL) : RenderPass
- Arguments:
device : Device
color_format : VkFormat
depth_format : VkFormat
color_final_layout : VkImageLayout
- create_render_pass_depth_only(device: Device; depth_format: VkFormat; final_layout: VkImageLayout = vulkan::VkImageLayout.DEPTH_STENCIL_READ_ONLY_OPTIMAL ): RenderPass
def create_render_pass_depth_only (device: Device; depth_format: VkFormat; final_layout: VkImageLayout = vulkan::VkImageLayout.DEPTH_STENCIL_READ_ONLY_OPTIMAL) : RenderPass
- Arguments:
device : Device
depth_format : VkFormat
final_layout : VkImageLayout
- create_render_pass_single_color(device: Device; format: VkFormat; final_layout: VkImageLayout = vulkan::VkImageLayout.TRANSFER_SRC_OPTIMAL ): RenderPass
def create_render_pass_single_color (device: Device; format: VkFormat; final_layout: VkImageLayout = vulkan::VkImageLayout.TRANSFER_SRC_OPTIMAL) : RenderPass
- Arguments:
device : Device
format : VkFormat
final_layout : VkImageLayout
5.8. Builders
5.8.1. build_offscreen_depth
- build_offscreen_depth(device: Device; phys: VkPhysicalDevice; width: int; height: int; format: VkFormat = vulkan::VkFormat.D32_SFLOAT ): OffscreenDepth
def build_offscreen_depth (device: Device; phys: VkPhysicalDevice; width: int; height: int; format: VkFormat = vulkan::VkFormat.D32_SFLOAT) : OffscreenDepth
- Arguments:
device : Device
phys : VkPhysicalDevice
width : int
height : int
format : VkFormat
- build_offscreen_depth(device: Device; phys: VkPhysicalDevice; width: int; height: int; format: VkFormat; extra_usage: VkImageUsageFlags ): OffscreenDepth
- build_offscreen_depth(device: Device; phys: VkPhysicalDevice; width: int; height: int; format: VkFormat; extra_usage: VkImageUsageFlags; samples: VkSampleCountFlags ): OffscreenDepth
5.8.2. build_offscreen_target
- build_offscreen_target(device: Device; phys: VkPhysicalDevice; width: int; height: int; format: VkFormat ): OffscreenTarget
def build_offscreen_target (device: Device; phys: VkPhysicalDevice; width: int; height: int; format: VkFormat) : OffscreenTarget
- Arguments:
device : Device
phys : VkPhysicalDevice
width : int
height : int
format : VkFormat
- build_offscreen_target(device: Device; phys: VkPhysicalDevice; width: int; height: int; format: VkFormat; samples: VkSampleCountFlags; extra_usage: VkImageUsageFlags ): OffscreenTarget
- compute_to_storage_image(words: array<uint>; w: int; h: int; srgb_encode: bool = false ): array<uint8>
def compute_to_storage_image (var words: array<uint>; w: int; h: int; srgb_encode: bool = false) : array<uint8>
- Arguments:
words : array<uint>
w : int
h : int
srgb_encode : bool
5.8.3. create_host_buffer
- create_host_buffer(device: Device; phys: VkPhysicalDevice; size: uint64 ): HostBuffer
def create_host_buffer (device: Device; phys: VkPhysicalDevice; size: uint64) : HostBuffer
- Arguments:
device : Device
phys : VkPhysicalDevice
size : uint64
- create_host_buffer(device: Device; phys: VkPhysicalDevice; size: uint64; usage: VkBufferUsageFlags ): HostBuffer
- create_host_buffer_from_bytes(device: Device; phys: VkPhysicalDevice; usage: VkBufferUsageFlags; data: array<auto(TT)> ): HostBuffer
def create_host_buffer_from_bytes (device: Device; phys: VkPhysicalDevice; usage: VkBufferUsageFlags; var data: array<auto(TT)>) : HostBuffer
- Arguments:
device : Device
phys : VkPhysicalDevice
usage : VkBufferUsageFlags
data : array<auto(TT)>
- create_sampler_shadow(device: Device; compare_op: VkCompareOp = vulkan::VkCompareOp.LESS ): Sampler
def create_sampler_shadow (device: Device; compare_op: VkCompareOp = vulkan::VkCompareOp.LESS) : Sampler
- Arguments:
device : Device
compare_op : VkCompareOp
5.9. Memory & brackets
upload_bytes (buf: AddressBuffer; device: Device; var data: array<auto(TT)>) : auto
upload_bytes (buf: HostBuffer; device: Device; var data: array<auto(TT)>) : auto
with_mapped_memory (device: Device; memory: DeviceMemory; blk: block<(ptr:void?):void>)
with_push_staging (size: uint; blk: block<(ptr:void?):void>)
write_field (ptr: void?; offset: uint; var value: auto(TT)) : auto
- map_memory_to_array(device: Device; memory: DeviceMemory; size: uint64; blk: block<(data:array<uint8>):void> )
def map_memory_to_array (device: Device; memory: DeviceMemory; size: uint64; blk: block<(data:array<uint8>):void>)
- Arguments:
device : Device
memory : DeviceMemory
size : uint64
blk : block<(data:array<uint8>):void>
- read_memory(device: Device; memory: DeviceMemory; elem: type<auto(TT) const>; count: int ): array<TT>
def read_memory (device: Device; memory: DeviceMemory; elem: type<auto(TT) const>; count: int) : array<TT>
- Arguments:
device : Device
memory : DeviceMemory
elem : auto(TT)
count : int
5.9.1. record_render_pass
- record_render_pass(cmd: CommandBuffer; render_pass: RenderPass; framebuffer: Framebuffer; area: VkRect2D; clear: VkClearValue; blk: block<():void> )
def record_render_pass (cmd: CommandBuffer; render_pass: RenderPass; framebuffer: Framebuffer; area: VkRect2D; clear: VkClearValue; blk: block<():void>)
- Arguments:
cmd : CommandBuffer
render_pass : RenderPass
framebuffer : Framebuffer
area : VkRect2D
clear : VkClearValue
blk : block<void>
- record_render_pass(cmd: CommandBuffer; render_pass: RenderPass; framebuffer: Framebuffer; area: VkRect2D; clears: array<VkClearValue>; blk: block<():void> )
5.9.2. record_rendering
- record_rendering(cmd: CommandBuffer; area: VkRect2D; layer_count: uint; color_attachments: array<RenderingAttachmentInfo>; blk: block<():void> )
def record_rendering (cmd: CommandBuffer; area: VkRect2D; layer_count: uint; var color_attachments: array<RenderingAttachmentInfo>; blk: block<():void>)
- Arguments:
cmd : CommandBuffer
area : VkRect2D
layer_count : uint
color_attachments : array< RenderingAttachmentInfo>
blk : block<void>
- record_rendering(cmd: CommandBuffer; area: VkRect2D; layer_count: uint; color_attachments: array<RenderingAttachmentInfo>; depth_attachment: RenderingAttachmentInfo; blk: block<():void> )
- run_cmd_sync(device: Device; pool: CommandPool; queue: VkQueue; blk: block<(cmd:CommandBuffer):void> )
def run_cmd_sync (device: Device; pool: CommandPool; queue: VkQueue; blk: block<(cmd:CommandBuffer):void>)
- Arguments:
device : Device
pool : CommandPool
queue : VkQueue
blk : block<(cmd: CommandBuffer):void>
5.9.3. upload_bytes
- upload_bytes(buf: AddressBuffer; device: Device; data: array<auto(TT)> ): auto
def upload_bytes (buf: AddressBuffer; device: Device; var data: array<auto(TT)>) : auto
- Arguments:
buf : AddressBuffer
device : Device
data : array<auto(TT)>
- upload_bytes(buf: HostBuffer; device: Device; data: array<auto(TT)> ): auto
- with_mapped_memory(device: Device; memory: DeviceMemory; blk: block<(ptr:void?):void> )
def with_mapped_memory (device: Device; memory: DeviceMemory; blk: block<(ptr:void?):void>)
- Arguments:
device : Device
memory : DeviceMemory
blk : block<(ptr:void?):void>
- with_push_staging(size: uint; blk: block<(ptr:void?):void> )
def with_push_staging (size: uint; blk: block<(ptr:void?):void>)
- Arguments:
size : uint
blk : block<(ptr:void?):void>
- write_field(ptr: void?; offset: uint; value: auto(TT) ): auto
def write_field (ptr: void?; offset: uint; var value: auto(TT)) : auto
- Arguments:
ptr : void?
offset : uint
value : auto(TT)
5.10. Command recording
- cmd_bind_pipeline(cmd: CommandBuffer; pipeline: Pipeline; bind_point: VkPipelineBindPoint = vulkan::VkPipelineBindPoint.GRAPHICS )
def cmd_bind_pipeline (cmd: CommandBuffer; pipeline: Pipeline; bind_point: VkPipelineBindPoint = vulkan::VkPipelineBindPoint.GRAPHICS)
- Arguments:
cmd : CommandBuffer
pipeline : Pipeline
bind_point : VkPipelineBindPoint
- cmd_bind_vertex_buffer(cmd: CommandBuffer; binding: uint; buffer: Buffer; offset: uint64 = 0x0 )
def cmd_bind_vertex_buffer (cmd: CommandBuffer; binding: uint; buffer: Buffer; offset: uint64 = 0x0)
- Arguments:
cmd : CommandBuffer
binding : uint
buffer : Buffer
offset : uint64
- cmd_draw(cmd: CommandBuffer; vertex_count: uint; instance_count: uint = 0x1 )
def cmd_draw (cmd: CommandBuffer; vertex_count: uint; instance_count: uint = 0x1)
- Arguments:
cmd : CommandBuffer
vertex_count : uint
instance_count : uint
- cmd_push_constants(cmd: CommandBuffer; layout: PipelineLayout; stages: VkShaderStageFlags; offset: uint; value: auto(TT) ): auto
def cmd_push_constants (cmd: CommandBuffer; layout: PipelineLayout; stages: VkShaderStageFlags; offset: uint; var value: auto(TT)) : auto
- Arguments:
cmd : CommandBuffer
layout : PipelineLayout
stages : VkShaderStageFlags
offset : uint
value : auto(TT)
- copy_image_to_buffer(cmd: CommandBuffer; image: Image; buffer: HostBuffer; width: int; height: int )
def copy_image_to_buffer (cmd: CommandBuffer; image: Image; buffer: HostBuffer; width: int; height: int)
- Arguments:
cmd : CommandBuffer
image : Image
buffer : HostBuffer
width : int
height : int
- transition_depth_image(cmd: CommandBuffer; image: Image; old_layout: VkImageLayout; new_layout: VkImageLayout; src_access: VkAccessFlags; dst_access: VkAccessFlags; src_stage: VkPipelineStageFlags; dst_stage: VkPipelineStageFlags )
def transition_depth_image (cmd: CommandBuffer; image: Image; old_layout: VkImageLayout; new_layout: VkImageLayout; src_access: VkAccessFlags; dst_access: VkAccessFlags; src_stage: VkPipelineStageFlags; dst_stage: VkPipelineStageFlags)
- Arguments:
cmd : CommandBuffer
image : Image
old_layout : VkImageLayout
new_layout : VkImageLayout
src_access : VkAccessFlags
dst_access : VkAccessFlags
src_stage : VkPipelineStageFlags
dst_stage : VkPipelineStageFlags
- transition_image(cmd: CommandBuffer; image: Image; old_layout: VkImageLayout; new_layout: VkImageLayout; src_access: VkAccessFlags; dst_access: VkAccessFlags; src_stage: VkPipelineStageFlags; dst_stage: VkPipelineStageFlags )
def transition_image (cmd: CommandBuffer; image: Image; old_layout: VkImageLayout; new_layout: VkImageLayout; src_access: VkAccessFlags; dst_access: VkAccessFlags; src_stage: VkPipelineStageFlags; dst_stage: VkPipelineStageFlags)
- Arguments:
cmd : CommandBuffer
image : Image
old_layout : VkImageLayout
new_layout : VkImageLayout
src_access : VkAccessFlags
dst_access : VkAccessFlags
src_stage : VkPipelineStageFlags
dst_stage : VkPipelineStageFlags
- transition_image_aspect(cmd: CommandBuffer; image: Image; old_layout: VkImageLayout; new_layout: VkImageLayout; src_access: VkAccessFlags; dst_access: VkAccessFlags; src_stage: VkPipelineStageFlags; dst_stage: VkPipelineStageFlags; aspect: VkImageAspectFlags )
def transition_image_aspect (cmd: CommandBuffer; image: Image; old_layout: VkImageLayout; new_layout: VkImageLayout; src_access: VkAccessFlags; dst_access: VkAccessFlags; src_stage: VkPipelineStageFlags; dst_stage: VkPipelineStageFlags; aspect: VkImageAspectFlags)
- Arguments:
cmd : CommandBuffer
image : Image
old_layout : VkImageLayout
new_layout : VkImageLayout
src_access : VkAccessFlags
dst_access : VkAccessFlags
src_stage : VkPipelineStageFlags
dst_stage : VkPipelineStageFlags
aspect : VkImageAspectFlags
5.11. Conveniences
- clear_color(r: float; g: float; b: float; a: float ): VkClearValue
def clear_color (r: float; g: float; b: float; a: float) : VkClearValue
- Arguments:
r : float
g : float
b : float
a : float
- clear_depth(depth: float = 1f; stencil: uint = 0x0 ): VkClearValue
def clear_depth (depth: float = 1f; stencil: uint = 0x0) : VkClearValue
- Arguments:
depth : float
stencil : uint
- full_area(width: int; height: int ): VkRect2D
def full_area (width: int; height: int) : VkRect2D
- Arguments:
width : int
height : int
5.12. Compute tier & device capabilities
cooperative_matrix2_fa_supported (phys: VkPhysicalDevice) : bool
cooperative_matrix2_supported (phys: VkPhysicalDevice) : bool
cooperative_matrix_supported (phys: VkPhysicalDevice) : bool
cooperative_vector_supported (phys: VkPhysicalDevice) : bool
create_device_cooperative_matrix (phys: VkPhysicalDevice; queue_family: uint) : Device
create_device_coopmat_full_subgroups (phys: VkPhysicalDevice; queue_family: uint) : Device
create_device_storage_8_16 (phys: VkPhysicalDevice; queue_family: uint) : Device
create_device_storage_8_16_int_dot (phys: VkPhysicalDevice; queue_family: uint) : Device
external_memory_host_min_alignment (phys: VkPhysicalDevice) : uint64
external_memory_host_supported (phys: VkPhysicalDevice) : bool
integer_dot_product_supported (phys: VkPhysicalDevice) : bool
subgroup_compute_ops_supported (phys: VkPhysicalDevice) : bool
subgroup_properties (phys: VkPhysicalDevice) : VkPhysicalDeviceSubgroupProperties
timeline_semaphore_supported (phys: VkPhysicalDevice) : bool
- cooperative_matrix2_fa_supported(phys: VkPhysicalDevice ): bool
def cooperative_matrix2_fa_supported (phys: VkPhysicalDevice) : bool
- Arguments:
phys : VkPhysicalDevice
- cooperative_matrix2_properties(phys: VkPhysicalDevice ): VkPhysicalDeviceCooperativeMatrix2PropertiesNV
def cooperative_matrix2_properties (phys: VkPhysicalDevice) : VkPhysicalDeviceCooperativeMatrix2PropertiesNV
- Arguments:
phys : VkPhysicalDevice
- cooperative_matrix2_supported(phys: VkPhysicalDevice ): bool
def cooperative_matrix2_supported (phys: VkPhysicalDevice) : bool
- Arguments:
phys : VkPhysicalDevice
- cooperative_matrix_supported(phys: VkPhysicalDevice ): bool
def cooperative_matrix_supported (phys: VkPhysicalDevice) : bool
- Arguments:
phys : VkPhysicalDevice
- cooperative_vector_supported(phys: VkPhysicalDevice ): bool
def cooperative_vector_supported (phys: VkPhysicalDevice) : bool
- Arguments:
phys : VkPhysicalDevice
- create_device_cooperative_matrix(phys: VkPhysicalDevice; queue_family: uint ): Device
def create_device_cooperative_matrix (phys: VkPhysicalDevice; queue_family: uint) : Device
- Arguments:
phys : VkPhysicalDevice
queue_family : uint
- create_device_coopmat_full_subgroups(phys: VkPhysicalDevice; queue_family: uint ): Device
def create_device_coopmat_full_subgroups (phys: VkPhysicalDevice; queue_family: uint) : Device
- Arguments:
phys : VkPhysicalDevice
queue_family : uint
5.12.1. create_device_storage_8_16
- create_device_storage_8_16(phys: VkPhysicalDevice; queue_family: uint ): Device
def create_device_storage_8_16 (phys: VkPhysicalDevice; queue_family: uint) : Device
- Arguments:
phys : VkPhysicalDevice
queue_family : uint
- create_device_storage_8_16(phys: VkPhysicalDevice; queue_family: uint; extensions: array<string> ): Device
- create_device_storage_8_16_int_dot(phys: VkPhysicalDevice; queue_family: uint ): Device
def create_device_storage_8_16_int_dot (phys: VkPhysicalDevice; queue_family: uint) : Device
- Arguments:
phys : VkPhysicalDevice
queue_family : uint
- create_device_storage_8_16_int_dot_coopmat(phys: VkPhysicalDevice; queue_family: uint; transfer_family: int = -1 ): Device
def create_device_storage_8_16_int_dot_coopmat (phys: VkPhysicalDevice; queue_family: uint; transfer_family: int = -1) : Device
- Arguments:
phys : VkPhysicalDevice
queue_family : uint
transfer_family : int
- create_device_storage_8_16_int_dot_coopmat2(phys: VkPhysicalDevice; queue_family: uint; transfer_family: int = -1 ): Device
def create_device_storage_8_16_int_dot_coopmat2 (phys: VkPhysicalDevice; queue_family: uint; transfer_family: int = -1) : Device
- Arguments:
phys : VkPhysicalDevice
queue_family : uint
transfer_family : int
- external_memory_host_min_alignment(phys: VkPhysicalDevice ): uint64
def external_memory_host_min_alignment (phys: VkPhysicalDevice) : uint64
- Arguments:
phys : VkPhysicalDevice
- external_memory_host_supported(phys: VkPhysicalDevice ): bool
def external_memory_host_supported (phys: VkPhysicalDevice) : bool
- Arguments:
phys : VkPhysicalDevice
- integer_dot_product_supported(phys: VkPhysicalDevice ): bool
def integer_dot_product_supported (phys: VkPhysicalDevice) : bool
- Arguments:
phys : VkPhysicalDevice
- memory_priority_supported(phys: VkPhysicalDevice ): bool
def memory_priority_supported (phys: VkPhysicalDevice) : bool
- Arguments:
phys : VkPhysicalDevice
- select_transfer_queue_family(phys: VkPhysicalDevice ): int
def select_transfer_queue_family (phys: VkPhysicalDevice) : int
- Arguments:
phys : VkPhysicalDevice
- storage_8_16_supported(phys: VkPhysicalDevice ): bool
def storage_8_16_supported (phys: VkPhysicalDevice) : bool
- Arguments:
phys : VkPhysicalDevice
- subgroup_compute_ops_supported(phys: VkPhysicalDevice ): bool
def subgroup_compute_ops_supported (phys: VkPhysicalDevice) : bool
- Arguments:
phys : VkPhysicalDevice
- subgroup_properties(phys: VkPhysicalDevice ): VkPhysicalDeviceSubgroupProperties
def subgroup_properties (phys: VkPhysicalDevice) : VkPhysicalDeviceSubgroupProperties
- Arguments:
phys : VkPhysicalDevice
- timeline_semaphore_supported(phys: VkPhysicalDevice ): bool
def timeline_semaphore_supported (phys: VkPhysicalDevice) : bool
- Arguments:
phys : VkPhysicalDevice
5.13. Pipeline introspection
- dump_pipeline_executables(device: Device; pipeline: Pipeline ): string
def dump_pipeline_executables (device: Device; pipeline: Pipeline) : string
- pipeline_exec_props_supported(phys: VkPhysicalDevice ): bool
def pipeline_exec_props_supported (phys: VkPhysicalDevice) : bool
- Arguments:
phys : VkPhysicalDevice