vklite API¶
Vulkan rendering resources, pipelines, commands, and synchronization through the vklite runtime layer.
Status: advanced/unstable
This generated page lists exported C functions and their canonical public types
classified by the v0.4 C API reference policy. Raw Python ctypes call forms are
documented separately.
Use this advanced API when building or integrating a renderer below DRP2. Ordinary applications should use the retained scene and app APIs.
Common workflows:
Functions: 291 Types: 29
Symbol Groups¶
| Group | Functions | Types | Headers |
|---|---|---|---|
| Commands And Rendering | 58 | 3 | 8 headers |
| Device And Presentation | 38 | 4 | include/datoviz/vklite/surface.h, include/datoviz/vklite/swapchain.h |
| Pipelines And Bindings | 70 | 6 | 5 headers |
| Resources | 74 | 9 | 3 headers |
| Synchronization And Submission | 51 | 7 | include/datoviz/vklite/sync.h |
Grouped function index
Commands And Rendering
| Function | Header |
|---|---|
dvz_attachment_clear() |
include/datoviz/vklite/rendering.h |
dvz_attachment_image() |
include/datoviz/vklite/rendering.h |
dvz_attachment_ops() |
include/datoviz/vklite/rendering.h |
dvz_attachment_resolve() |
include/datoviz/vklite/rendering.h |
dvz_cmd_barriers() |
include/datoviz/vklite/sync.h |
dvz_cmd_begin() |
include/datoviz/vklite/commands.h |
dvz_cmd_begin_result() |
include/datoviz/vklite/commands.h |
dvz_cmd_bind_compute() |
include/datoviz/vklite/compute.h |
dvz_cmd_bind_descriptors() |
include/datoviz/vklite/descriptors.h |
dvz_cmd_bind_graphics() |
include/datoviz/vklite/graphics.h |
dvz_cmd_bind_index_buffer() |
include/datoviz/vklite/buffers.h |
dvz_cmd_bind_vertex_buffers() |
include/datoviz/vklite/buffers.h |
dvz_cmd_blit_destination() |
include/datoviz/vklite/images.h |
dvz_cmd_blit_filter() |
include/datoviz/vklite/images.h |
dvz_cmd_blit_image() |
include/datoviz/vklite/images.h |
dvz_cmd_blit_source() |
include/datoviz/vklite/images.h |
dvz_cmd_copy_buffer_to_image() |
include/datoviz/vklite/images.h |
dvz_cmd_copy_destination() |
include/datoviz/vklite/images.h |
dvz_cmd_copy_image() |
include/datoviz/vklite/images.h |
dvz_cmd_copy_image_to_buffer() |
include/datoviz/vklite/images.h |
dvz_cmd_copy_source() |
include/datoviz/vklite/images.h |
dvz_cmd_dispatch() |
include/datoviz/vklite/compute.h |
dvz_cmd_draw() |
include/datoviz/vklite/rendering.h |
dvz_cmd_draw_indexed() |
include/datoviz/vklite/rendering.h |
dvz_cmd_draw_indexed_indirect() |
include/datoviz/vklite/rendering.h |
dvz_cmd_draw_indirect() |
include/datoviz/vklite/rendering.h |
dvz_cmd_end() |
include/datoviz/vklite/commands.h |
dvz_cmd_end_result() |
include/datoviz/vklite/commands.h |
dvz_cmd_release() |
include/datoviz/vklite/commands.h |
dvz_cmd_rendering_begin() |
include/datoviz/vklite/rendering.h |
dvz_cmd_rendering_default() |
include/datoviz/vklite/rendering.h |
dvz_cmd_rendering_end() |
include/datoviz/vklite/rendering.h |
dvz_cmd_reset() |
include/datoviz/vklite/commands.h |
dvz_cmd_submit() |
include/datoviz/vklite/commands.h |
dvz_cmd_submit_result() |
include/datoviz/vklite/commands.h |
dvz_command_buffer_alloc() |
include/datoviz/vklite/commands.h |
dvz_command_buffer_free() |
include/datoviz/vklite/commands.h |
dvz_commands() |
include/datoviz/vklite/commands.h |
dvz_commands_count() |
include/datoviz/vklite/commands.h |
dvz_commands_create_wrapper() |
include/datoviz/vklite/commands.h |
dvz_commands_current() |
include/datoviz/vklite/commands.h |
dvz_commands_destroy() |
include/datoviz/vklite/commands.h |
dvz_commands_free() |
include/datoviz/vklite/commands.h |
dvz_commands_handle() |
include/datoviz/vklite/commands.h |
dvz_commands_wrap() |
include/datoviz/vklite/commands.h |
dvz_commands_wrap_borrowed_recording() |
include/datoviz/vklite/commands.h |
dvz_rendering() |
include/datoviz/vklite/rendering.h |
dvz_rendering_area() |
include/datoviz/vklite/rendering.h |
dvz_rendering_color() |
include/datoviz/vklite/rendering.h |
dvz_rendering_color_count() |
include/datoviz/vklite/rendering.h |
dvz_rendering_create_wrapper() |
include/datoviz/vklite/rendering.h |
dvz_rendering_depth() |
include/datoviz/vklite/rendering.h |
dvz_rendering_free() |
include/datoviz/vklite/rendering.h |
dvz_rendering_has_depth() |
include/datoviz/vklite/rendering.h |
dvz_rendering_has_stencil() |
include/datoviz/vklite/rendering.h |
dvz_rendering_layer_count() |
include/datoviz/vklite/rendering.h |
dvz_rendering_layers() |
include/datoviz/vklite/rendering.h |
dvz_rendering_stencil() |
include/datoviz/vklite/rendering.h |
Device And Presentation
| Function | Header |
|---|---|
dvz_surface_capabilities() |
include/datoviz/vklite/surface.h |
dvz_surface_create_wrapper() |
include/datoviz/vklite/surface.h |
dvz_surface_destroy() |
include/datoviz/vklite/surface.h |
dvz_surface_extent() |
include/datoviz/vklite/surface.h |
dvz_surface_format() |
include/datoviz/vklite/surface.h |
dvz_surface_format_count() |
include/datoviz/vklite/surface.h |
dvz_surface_free() |
include/datoviz/vklite/surface.h |
dvz_surface_handle() |
include/datoviz/vklite/surface.h |
dvz_surface_has_present_mode() |
include/datoviz/vklite/surface.h |
dvz_surface_init_from_device() |
include/datoviz/vklite/surface.h |
dvz_surface_init_from_instance() |
include/datoviz/vklite/surface.h |
dvz_surface_preferred_format() |
include/datoviz/vklite/surface.h |
dvz_surface_preferred_present_mode() |
include/datoviz/vklite/surface.h |
dvz_surface_present_mode() |
include/datoviz/vklite/surface.h |
dvz_surface_present_mode_count() |
include/datoviz/vklite/surface.h |
dvz_surface_ready() |
include/datoviz/vklite/surface.h |
dvz_surface_refresh() |
include/datoviz/vklite/surface.h |
dvz_surface_set_extent_hint() |
include/datoviz/vklite/surface.h |
dvz_surface_wrap_native() |
include/datoviz/vklite/surface.h |
dvz_swapchain_acquire() |
include/datoviz/vklite/swapchain.h |
dvz_swapchain_color_space() |
include/datoviz/vklite/swapchain.h |
dvz_swapchain_config() |
include/datoviz/vklite/swapchain.h |
dvz_swapchain_create_wrapper() |
include/datoviz/vklite/swapchain.h |
dvz_swapchain_destroy() |
include/datoviz/vklite/swapchain.h |
dvz_swapchain_device() |
include/datoviz/vklite/swapchain.h |
dvz_swapchain_extent() |
include/datoviz/vklite/swapchain.h |
dvz_swapchain_free() |
include/datoviz/vklite/swapchain.h |
dvz_swapchain_get_config() |
include/datoviz/vklite/swapchain.h |
dvz_swapchain_handle() |
include/datoviz/vklite/swapchain.h |
dvz_swapchain_image() |
include/datoviz/vklite/swapchain.h |
dvz_swapchain_image_count() |
include/datoviz/vklite/swapchain.h |
dvz_swapchain_image_format() |
include/datoviz/vklite/swapchain.h |
dvz_swapchain_image_view() |
include/datoviz/vklite/swapchain.h |
dvz_swapchain_init_from_device() |
include/datoviz/vklite/swapchain.h |
dvz_swapchain_present() |
include/datoviz/vklite/swapchain.h |
dvz_swapchain_present_mode() |
include/datoviz/vklite/swapchain.h |
dvz_swapchain_ready() |
include/datoviz/vklite/swapchain.h |
dvz_swapchain_recreate() |
include/datoviz/vklite/swapchain.h |
Pipelines And Bindings
| Function | Header |
|---|---|
dvz_compute() |
include/datoviz/vklite/compute.h |
dvz_compute_create() |
include/datoviz/vklite/compute.h |
dvz_compute_create_wrapper() |
include/datoviz/vklite/compute.h |
dvz_compute_destroy() |
include/datoviz/vklite/compute.h |
dvz_compute_free() |
include/datoviz/vklite/compute.h |
dvz_compute_handle() |
include/datoviz/vklite/compute.h |
dvz_compute_layout() |
include/datoviz/vklite/compute.h |
dvz_compute_layout_handle() |
include/datoviz/vklite/compute.h |
dvz_compute_shader() |
include/datoviz/vklite/compute.h |
dvz_compute_spec() |
include/datoviz/vklite/compute.h |
dvz_descriptors() |
include/datoviz/vklite/descriptors.h |
dvz_descriptors_buffer() |
include/datoviz/vklite/descriptors.h |
dvz_descriptors_create_wrapper() |
include/datoviz/vklite/descriptors.h |
dvz_descriptors_free() |
include/datoviz/vklite/descriptors.h |
dvz_descriptors_handle() |
include/datoviz/vklite/descriptors.h |
dvz_descriptors_image() |
include/datoviz/vklite/descriptors.h |
dvz_descriptors_set_count() |
include/datoviz/vklite/descriptors.h |
dvz_graphics() |
include/datoviz/vklite/graphics.h |
dvz_graphics_attachment_color() |
include/datoviz/vklite/graphics.h |
dvz_graphics_attachment_depth() |
include/datoviz/vklite/graphics.h |
dvz_graphics_attachment_stencil() |
include/datoviz/vklite/graphics.h |
dvz_graphics_blend() |
include/datoviz/vklite/graphics.h |
dvz_graphics_blend_alpha() |
include/datoviz/vklite/graphics.h |
dvz_graphics_blend_color() |
include/datoviz/vklite/graphics.h |
dvz_graphics_color_attachment_count() |
include/datoviz/vklite/graphics.h |
dvz_graphics_color_write_mask() |
include/datoviz/vklite/graphics.h |
dvz_graphics_create() |
include/datoviz/vklite/graphics.h |
dvz_graphics_create_wrapper() |
include/datoviz/vklite/graphics.h |
dvz_graphics_cull_mode() |
include/datoviz/vklite/graphics.h |
dvz_graphics_depth() |
include/datoviz/vklite/graphics.h |
dvz_graphics_depth_bias() |
include/datoviz/vklite/graphics.h |
dvz_graphics_depth_bounds() |
include/datoviz/vklite/graphics.h |
dvz_graphics_destroy() |
include/datoviz/vklite/graphics.h |
dvz_graphics_free() |
include/datoviz/vklite/graphics.h |
dvz_graphics_front_face() |
include/datoviz/vklite/graphics.h |
dvz_graphics_handle() |
include/datoviz/vklite/graphics.h |
dvz_graphics_layout() |
include/datoviz/vklite/graphics.h |
dvz_graphics_layout_handle() |
include/datoviz/vklite/graphics.h |
dvz_graphics_multisampling() |
include/datoviz/vklite/graphics.h |
dvz_graphics_polygon_mode() |
include/datoviz/vklite/graphics.h |
dvz_graphics_primitive() |
include/datoviz/vklite/graphics.h |
dvz_graphics_primitive_restart() |
include/datoviz/vklite/graphics.h |
dvz_graphics_scissor() |
include/datoviz/vklite/graphics.h |
dvz_graphics_shader() |
include/datoviz/vklite/graphics.h |
dvz_graphics_shader_count() |
include/datoviz/vklite/graphics.h |
dvz_graphics_spec() |
include/datoviz/vklite/graphics.h |
dvz_graphics_stencil() |
include/datoviz/vklite/graphics.h |
dvz_graphics_vertex_attr() |
include/datoviz/vklite/graphics.h |
dvz_graphics_vertex_binding() |
include/datoviz/vklite/graphics.h |
dvz_graphics_viewport() |
include/datoviz/vklite/graphics.h |
dvz_shader() |
include/datoviz/vklite/shader.h |
dvz_shader_create_wrapper() |
include/datoviz/vklite/shader.h |
dvz_shader_destroy() |
include/datoviz/vklite/shader.h |
dvz_shader_free() |
include/datoviz/vklite/shader.h |
dvz_shader_handle() |
include/datoviz/vklite/shader.h |
dvz_slots() |
include/datoviz/vklite/slots.h |
dvz_slots_binding() |
include/datoviz/vklite/slots.h |
dvz_slots_binding_count() |
include/datoviz/vklite/slots.h |
dvz_slots_combined_pipeline_layout() |
include/datoviz/vklite/slots.h |
dvz_slots_create() |
include/datoviz/vklite/slots.h |
dvz_slots_create_wrapper() |
include/datoviz/vklite/slots.h |
dvz_slots_descriptor_type() |
include/datoviz/vklite/slots.h |
dvz_slots_destroy() |
include/datoviz/vklite/slots.h |
dvz_slots_device() |
include/datoviz/vklite/slots.h |
dvz_slots_free() |
include/datoviz/vklite/slots.h |
dvz_slots_handle() |
include/datoviz/vklite/slots.h |
dvz_slots_push() |
include/datoviz/vklite/slots.h |
dvz_slots_push_count() |
include/datoviz/vklite/slots.h |
dvz_slots_set_count() |
include/datoviz/vklite/slots.h |
dvz_slots_set_layout() |
include/datoviz/vklite/slots.h |
Resources
| Function | Header |
|---|---|
dvz_buffer() |
include/datoviz/vklite/buffers.h |
dvz_buffer_allocated_size() |
include/datoviz/vklite/buffers.h |
dvz_buffer_create() |
include/datoviz/vklite/buffers.h |
dvz_buffer_create_wrapper() |
include/datoviz/vklite/buffers.h |
dvz_buffer_destroy() |
include/datoviz/vklite/buffers.h |
dvz_buffer_download() |
include/datoviz/vklite/buffers.h |
dvz_buffer_flags() |
include/datoviz/vklite/buffers.h |
dvz_buffer_free() |
include/datoviz/vklite/buffers.h |
dvz_buffer_handle() |
include/datoviz/vklite/buffers.h |
dvz_buffer_map() |
include/datoviz/vklite/buffers.h |
dvz_buffer_resize() |
include/datoviz/vklite/buffers.h |
dvz_buffer_size() |
include/datoviz/vklite/buffers.h |
dvz_buffer_size_value() |
include/datoviz/vklite/buffers.h |
dvz_buffer_unmap() |
include/datoviz/vklite/buffers.h |
dvz_buffer_upload() |
include/datoviz/vklite/buffers.h |
dvz_buffer_usage() |
include/datoviz/vklite/buffers.h |
dvz_buffer_views() |
include/datoviz/vklite/buffers.h |
dvz_buffer_views_aligned_size() |
include/datoviz/vklite/buffers.h |
dvz_buffer_views_count() |
include/datoviz/vklite/buffers.h |
dvz_buffer_views_create() |
include/datoviz/vklite/buffers.h |
dvz_buffer_views_free() |
include/datoviz/vklite/buffers.h |
dvz_buffer_views_offset() |
include/datoviz/vklite/buffers.h |
dvz_buffer_views_size() |
include/datoviz/vklite/buffers.h |
dvz_image_blit() |
include/datoviz/vklite/images.h |
dvz_image_blit_create() |
include/datoviz/vklite/images.h |
dvz_image_blit_free() |
include/datoviz/vklite/images.h |
dvz_image_copy() |
include/datoviz/vklite/images.h |
dvz_image_copy_create() |
include/datoviz/vklite/images.h |
dvz_image_copy_free() |
include/datoviz/vklite/images.h |
dvz_image_handle() |
include/datoviz/vklite/images.h |
dvz_image_region() |
include/datoviz/vklite/images.h |
dvz_image_region_aspect() |
include/datoviz/vklite/images.h |
dvz_image_region_extent() |
include/datoviz/vklite/images.h |
dvz_image_region_layers() |
include/datoviz/vklite/images.h |
dvz_image_region_mip() |
include/datoviz/vklite/images.h |
dvz_image_region_offset() |
include/datoviz/vklite/images.h |
dvz_image_views() |
include/datoviz/vklite/images.h |
dvz_image_views_aspect() |
include/datoviz/vklite/images.h |
dvz_image_views_count() |
include/datoviz/vklite/images.h |
dvz_image_views_create() |
include/datoviz/vklite/images.h |
dvz_image_views_create_wrapper() |
include/datoviz/vklite/images.h |
dvz_image_views_destroy() |
include/datoviz/vklite/images.h |
dvz_image_views_free() |
include/datoviz/vklite/images.h |
dvz_image_views_handle() |
include/datoviz/vklite/images.h |
dvz_image_views_layers() |
include/datoviz/vklite/images.h |
dvz_image_views_mip() |
include/datoviz/vklite/images.h |
dvz_image_views_type() |
include/datoviz/vklite/images.h |
dvz_images() |
include/datoviz/vklite/images.h |
dvz_images_alloc_flags() |
include/datoviz/vklite/images.h |
dvz_images_count() |
include/datoviz/vklite/images.h |
dvz_images_create() |
include/datoviz/vklite/images.h |
dvz_images_create_wrapper() |
include/datoviz/vklite/images.h |
dvz_images_destroy() |
include/datoviz/vklite/images.h |
dvz_images_flags() |
include/datoviz/vklite/images.h |
dvz_images_format() |
include/datoviz/vklite/images.h |
dvz_images_format_value() |
include/datoviz/vklite/images.h |
dvz_images_free() |
include/datoviz/vklite/images.h |
dvz_images_layers() |
include/datoviz/vklite/images.h |
dvz_images_mip() |
include/datoviz/vklite/images.h |
dvz_images_samples() |
include/datoviz/vklite/images.h |
dvz_images_size() |
include/datoviz/vklite/images.h |
dvz_images_tiling() |
include/datoviz/vklite/images.h |
dvz_images_usage() |
include/datoviz/vklite/images.h |
dvz_images_wrap() |
include/datoviz/vklite/images.h |
dvz_sampler() |
include/datoviz/vklite/sampler.h |
dvz_sampler_address_mode() |
include/datoviz/vklite/sampler.h |
dvz_sampler_anisotropy() |
include/datoviz/vklite/sampler.h |
dvz_sampler_create() |
include/datoviz/vklite/sampler.h |
dvz_sampler_create_wrapper() |
include/datoviz/vklite/sampler.h |
dvz_sampler_destroy() |
include/datoviz/vklite/sampler.h |
dvz_sampler_free() |
include/datoviz/vklite/sampler.h |
dvz_sampler_handle() |
include/datoviz/vklite/sampler.h |
dvz_sampler_mag_filter() |
include/datoviz/vklite/sampler.h |
dvz_sampler_min_filter() |
include/datoviz/vklite/sampler.h |
Synchronization And Submission
| Function | Header |
|---|---|
dvz_barrier_buffer_access() |
include/datoviz/vklite/sync.h |
dvz_barrier_buffer_queue() |
include/datoviz/vklite/sync.h |
dvz_barrier_buffer_stage() |
include/datoviz/vklite/sync.h |
dvz_barrier_image_access() |
include/datoviz/vklite/sync.h |
dvz_barrier_image_aspect() |
include/datoviz/vklite/sync.h |
dvz_barrier_image_layers() |
include/datoviz/vklite/sync.h |
dvz_barrier_image_layout() |
include/datoviz/vklite/sync.h |
dvz_barrier_image_mip() |
include/datoviz/vklite/sync.h |
dvz_barrier_image_queue() |
include/datoviz/vklite/sync.h |
dvz_barrier_image_stage() |
include/datoviz/vklite/sync.h |
dvz_barrier_memory_access() |
include/datoviz/vklite/sync.h |
dvz_barrier_memory_stage() |
include/datoviz/vklite/sync.h |
dvz_barriers() |
include/datoviz/vklite/sync.h |
dvz_barriers_buffer() |
include/datoviz/vklite/sync.h |
dvz_barriers_buffer_count() |
include/datoviz/vklite/sync.h |
dvz_barriers_capacity() |
include/datoviz/vklite/sync.h |
dvz_barriers_dependency_flags() |
include/datoviz/vklite/sync.h |
dvz_barriers_flags() |
include/datoviz/vklite/sync.h |
dvz_barriers_image() |
include/datoviz/vklite/sync.h |
dvz_barriers_image_count() |
include/datoviz/vklite/sync.h |
dvz_barriers_memory() |
include/datoviz/vklite/sync.h |
dvz_barriers_memory_count() |
include/datoviz/vklite/sync.h |
dvz_fence() |
include/datoviz/vklite/sync.h |
dvz_fence_create_wrapper() |
include/datoviz/vklite/sync.h |
dvz_fence_destroy() |
include/datoviz/vklite/sync.h |
dvz_fence_free() |
include/datoviz/vklite/sync.h |
dvz_fence_handle() |
include/datoviz/vklite/sync.h |
dvz_fence_ready() |
include/datoviz/vklite/sync.h |
dvz_fence_reset() |
include/datoviz/vklite/sync.h |
dvz_fence_wait() |
include/datoviz/vklite/sync.h |
dvz_semaphore() |
include/datoviz/vklite/sync.h |
dvz_semaphore_create_wrapper() |
include/datoviz/vklite/sync.h |
dvz_semaphore_destroy() |
include/datoviz/vklite/sync.h |
dvz_semaphore_export_fd() |
include/datoviz/vklite/sync.h |
dvz_semaphore_free() |
include/datoviz/vklite/sync.h |
dvz_semaphore_handle() |
include/datoviz/vklite/sync.h |
dvz_semaphore_query() |
include/datoviz/vklite/sync.h |
dvz_semaphore_signal() |
include/datoviz/vklite/sync.h |
dvz_semaphore_timeline() |
include/datoviz/vklite/sync.h |
dvz_semaphore_wait() |
include/datoviz/vklite/sync.h |
dvz_submit() |
include/datoviz/vklite/sync.h |
dvz_submit_command() |
include/datoviz/vklite/sync.h |
dvz_submit_command_count() |
include/datoviz/vklite/sync.h |
dvz_submit_create_wrapper() |
include/datoviz/vklite/sync.h |
dvz_submit_free() |
include/datoviz/vklite/sync.h |
dvz_submit_is_empty() |
include/datoviz/vklite/sync.h |
dvz_submit_send() |
include/datoviz/vklite/sync.h |
dvz_submit_signal() |
include/datoviz/vklite/sync.h |
dvz_submit_signal_count() |
include/datoviz/vklite/sync.h |
dvz_submit_wait() |
include/datoviz/vklite/sync.h |
dvz_submit_wait_count() |
include/datoviz/vklite/sync.h |
Commands And Rendering¶
Functions
dvz_attachment_clear()¶
Set the attachment clear value.
void dvz_attachment_clear(
DvzAttachment * attachment,
VkClearValue clear
);
| Field | Type | Description |
|---|---|---|
attachment |
DvzAttachment * |
the attachment |
clear |
VkClearValue |
the clear value |
Declared in include/datoviz/vklite/rendering.h:92.
dvz_attachment_image()¶
Set the attachment image view and layout.
void dvz_attachment_image(
DvzAttachment * attachment,
VkImageView view,
VkImageLayout layout
);
| Field | Type | Description |
|---|---|---|
attachment |
DvzAttachment * |
the attachment |
view |
VkImageView |
the image view |
layout |
VkImageLayout |
the image layout |
Declared in include/datoviz/vklite/rendering.h:57.
dvz_attachment_ops()¶
Set the attachment load and store operations.
void dvz_attachment_ops(
DvzAttachment * attachment,
VkAttachmentLoadOp load,
VkAttachmentStoreOp store
);
| Field | Type | Description |
|---|---|---|
attachment |
DvzAttachment * |
the attachment |
load |
VkAttachmentLoadOp |
the load operation |
store |
VkAttachmentStoreOp |
the store operation |
Declared in include/datoviz/vklite/rendering.h:82.
dvz_attachment_resolve()¶
When using multisampling, set the resolve mod and image view.
void dvz_attachment_resolve(
DvzAttachment * attachment,
VkResolveModeFlagBits mode,
VkImageView view,
VkImageLayout layout
);
| Field | Type | Description |
|---|---|---|
attachment |
DvzAttachment * |
the attachment |
mode |
VkResolveModeFlagBits |
the resolve mode flags |
view |
VkImageView |
the resolve image view |
layout |
VkImageLayout |
the resolve image layout |
Declared in include/datoviz/vklite/rendering.h:69.
dvz_cmd_barriers()¶
Record a set of barriers in a command buffer.
void dvz_cmd_barriers(
DvzCommands * cmds,
DvzBarriers * barriers
);
| Field | Type | Description |
|---|---|---|
cmds |
DvzCommands * |
the command buffers |
barriers |
DvzBarriers * |
the set of barriers |
Declared in include/datoviz/vklite/sync.h:363.
dvz_cmd_begin()¶
Start recording the currently selected owned command buffer.
This convenience wrapper logs failures from dvz_cmd_begin_result(). It must not be used with an externally owned command buffer wrapped as already recording.
void dvz_cmd_begin(
DvzCommands * cmds
);
| Field | Type | Description |
|---|---|---|
cmds |
DvzCommands * |
the set of command buffers |
Declared in include/datoviz/vklite/commands.h:166.
dvz_cmd_begin_result()¶
Start recording the currently selected owned command buffer.
This operation is rejected for an externally owned command buffer wrapped as already recording.
int dvz_cmd_begin_result(
DvzCommands * cmds
);
| Field | Type | Description |
|---|---|---|
| return | int |
0 on success, non-zero on Vulkan or state failure |
cmds |
DvzCommands * |
the set of command buffers |
Declared in include/datoviz/vklite/commands.h:154.
dvz_cmd_bind_compute()¶
Bind a compute pipeline.
void dvz_cmd_bind_compute(
DvzCommands * cmds,
DvzCompute * compute
);
| Field | Type | Description |
|---|---|---|
cmds |
DvzCommands * |
the set of command buffers to record |
compute |
DvzCompute * |
the compute pipeline |
Declared in include/datoviz/vklite/compute.h:178.
dvz_cmd_bind_descriptors()¶
Bind descriptors in a command buffer.
void dvz_cmd_bind_descriptors(
DvzCommands * cmds,
VkPipelineBindPoint bind_point,
DvzDescriptors * descriptors,
uint32_t first_set,
uint32_t set_count,
uint32_t dynamic_count,
uint32_t * dynamic_idxs
);
| Field | Type | Description |
|---|---|---|
cmds |
DvzCommands * |
the commands |
bind_point |
VkPipelineBindPoint |
graphics or compute pipeline |
descriptors |
DvzDescriptors * |
the descriptors |
first_set |
uint32_t |
the index of the first set to bind within the descriptors |
set_count |
uint32_t |
the number of sets to bind |
dynamic_count |
uint32_t |
the number of dynamic uniforms |
dynamic_idxs |
uint32_t * |
the indices of the dynamic uniforms |
Declared in include/datoviz/vklite/descriptors.h:146.
dvz_cmd_bind_graphics()¶
Bind a graphics pipeline.
void dvz_cmd_bind_graphics(
DvzCommands * cmds,
DvzGraphics * graphics
);
| Field | Type | Description |
|---|---|---|
cmds |
DvzCommands * |
the set of command buffers to record |
graphics |
DvzGraphics * |
the graphics pipeline |
Declared in include/datoviz/vklite/graphics.h:510.
dvz_cmd_bind_index_buffer()¶
Bind an index buffer.
void dvz_cmd_bind_index_buffer(
DvzCommands * cmds,
DvzBuffer * buffer,
DvzSize offset,
VkIndexType index_type
);
| Field | Type | Description |
|---|---|---|
cmds |
DvzCommands * |
the command buffers |
buffer |
DvzBuffer * |
the index buffer |
offset |
DvzSize |
byte offset within the index buffer |
index_type |
VkIndexType |
the Vulkan index type |
Declared in include/datoviz/vklite/buffers.h:341.
dvz_cmd_bind_vertex_buffers()¶
Bind vertex buffers before recording draw commands.
void dvz_cmd_bind_vertex_buffers(
DvzCommands * cmds,
uint32_t first_binding,
uint32_t binding_count,
DvzBuffer * buffers,
DvzSize * offsets
);
| Field | Type | Description |
|---|---|---|
cmds |
DvzCommands * |
the command buffers |
first_binding |
uint32_t |
the index of the first vertex binding |
binding_count |
uint32_t |
the number of bindings |
buffers |
DvzBuffer * |
the "binding_count" buffers to bind |
offsets |
DvzSize * |
array of binding_count byte offsets, one per buffer |
Declared in include/datoviz/vklite/buffers.h:326.
dvz_cmd_blit_destination()¶
Define the destination of a blit operation.
void dvz_cmd_blit_destination(
DvzImageBlit * blit,
VkImage image,
VkImageLayout layout,
int32_t x0,
int32_t y0,
int32_t z0,
int32_t x1,
int32_t y1,
int32_t z1
);
| Field | Type | Description |
|---|---|---|
blit |
DvzImageBlit * |
the blit structure |
image |
VkImage |
destination image handle |
layout |
VkImageLayout |
current destination image layout, valid for transfer-destination access |
x0 |
int32_t |
first destination x coordinate |
y0 |
int32_t |
first destination y coordinate |
z0 |
int32_t |
first destination z coordinate |
x1 |
int32_t |
the destination offset x |
y1 |
int32_t |
the destination offset y |
z1 |
int32_t |
the destination offset z |
Declared in include/datoviz/vklite/images.h:626.
dvz_cmd_blit_filter()¶
Set the filter of a blit operation.
void dvz_cmd_blit_filter(
DvzImageBlit * blit,
VkFilter filter
);
| Field | Type | Description |
|---|---|---|
blit |
DvzImageBlit * |
the blit structure |
filter |
VkFilter |
the filter |
Declared in include/datoviz/vklite/images.h:638.
dvz_cmd_blit_image()¶
Record the configured image blit operation.
void dvz_cmd_blit_image(
DvzCommands * cmds,
DvzImageBlit * blit
);
| Field | Type | Description |
|---|---|---|
cmds |
DvzCommands * |
recording command-buffer wrapper |
blit |
DvzImageBlit * |
the blit structure |
Declared in include/datoviz/vklite/images.h:648.
dvz_cmd_blit_source()¶
Define the source of a blit operation.
void dvz_cmd_blit_source(
DvzImageBlit * blit,
VkImage image,
VkImageLayout layout,
int32_t x0,
int32_t y0,
int32_t z0,
int32_t x1,
int32_t y1,
int32_t z1
);
| Field | Type | Description |
|---|---|---|
blit |
DvzImageBlit * |
the blit structure |
image |
VkImage |
source image handle |
layout |
VkImageLayout |
current source image layout, valid for transfer-source access |
x0 |
int32_t |
first source x coordinate |
y0 |
int32_t |
first source y coordinate |
z0 |
int32_t |
first source z coordinate |
x1 |
int32_t |
the source offset x |
y1 |
int32_t |
the source offset y |
z1 |
int32_t |
the source offset z |
Declared in include/datoviz/vklite/images.h:607.
dvz_cmd_copy_buffer_to_image()¶
Copy a GPU buffer to a GPU image.
void dvz_cmd_copy_buffer_to_image(
DvzCommands * cmds,
VkBuffer buffer,
DvzSize offset,
VkImage img,
VkImageLayout layout,
DvzImageRegion * region
);
| Field | Type | Description |
|---|---|---|
cmds |
DvzCommands * |
the command buffers |
buffer |
VkBuffer |
the source buffer |
offset |
DvzSize |
source byte offset within buffer |
img |
VkImage |
the target image |
layout |
VkImageLayout |
current layout of img, valid for transfer-destination access |
region |
DvzImageRegion * |
destination subresource, offset, and extent |
Declared in include/datoviz/vklite/images.h:528.
dvz_cmd_copy_destination()¶
Define the destination image and offset of an image copy operation.
void dvz_cmd_copy_destination(
DvzImageCopy * copy,
VkImage image,
VkImageLayout layout,
int32_t x,
int32_t y,
int32_t z
);
| Field | Type | Description |
|---|---|---|
copy |
DvzImageCopy * |
the copy structure |
image |
VkImage |
destination image handle |
layout |
VkImageLayout |
current destination image layout, valid for transfer-destination access |
x |
int32_t |
the destination offset x |
y |
int32_t |
the destination offset y |
z |
int32_t |
the destination offset z |
Declared in include/datoviz/vklite/images.h:579.
dvz_cmd_copy_image()¶
Record the configured image copy operation.
void dvz_cmd_copy_image(
DvzCommands * cmds,
DvzImageCopy * copy
);
| Field | Type | Description |
|---|---|---|
cmds |
DvzCommands * |
recording command-buffer wrapper |
copy |
DvzImageCopy * |
the copy structure |
Declared in include/datoviz/vklite/images.h:590.
dvz_cmd_copy_image_to_buffer()¶
Copy a GPU image to a GPU buffer.
void dvz_cmd_copy_image_to_buffer(
DvzCommands * cmds,
VkImage img,
VkImageLayout layout,
DvzImageRegion * region,
VkBuffer buffer,
DvzSize offset
);
| Field | Type | Description |
|---|---|---|
cmds |
DvzCommands * |
the set of command buffers to record |
img |
VkImage |
source image handle |
layout |
VkImageLayout |
current layout of img, valid for transfer-source access |
region |
DvzImageRegion * |
source subresource, offset, and extent |
buffer |
VkBuffer |
destination buffer handle |
offset |
DvzSize |
destination byte offset within buffer |
Declared in include/datoviz/vklite/images.h:544.
dvz_cmd_copy_source()¶
Define the source image and region of an image copy operation.
void dvz_cmd_copy_source(
DvzImageCopy * copy,
VkImage image,
VkImageLayout layout,
int32_t x,
int32_t y,
int32_t z,
uint32_t width,
uint32_t height,
uint32_t depth
);
| Field | Type | Description |
|---|---|---|
copy |
DvzImageCopy * |
the copy structure |
image |
VkImage |
source image handle |
layout |
VkImageLayout |
current source image layout, valid for transfer-source access |
x |
int32_t |
the source offset x |
y |
int32_t |
the source offset y |
z |
int32_t |
the source offset z |
width |
uint32_t |
the width |
height |
uint32_t |
the height |
depth |
uint32_t |
the depth |
Declared in include/datoviz/vklite/images.h:563.
dvz_cmd_dispatch()¶
Dispatch a compute task.
void dvz_cmd_dispatch(
DvzCommands * cmds,
uint32_t nx,
uint32_t ny,
uint32_t nz
);
| Field | Type | Description |
|---|---|---|
cmds |
DvzCommands * |
the set of command buffers to record |
nx |
uint32_t |
the number of local workgroups to dispatch in the X dimension |
ny |
uint32_t |
the number of local workgroups to dispatch in the Y dimension |
nz |
uint32_t |
the number of local workgroups to dispatch in the Z dimension |
Declared in include/datoviz/vklite/compute.h:190.
dvz_cmd_draw()¶
Direct draw.
void dvz_cmd_draw(
DvzCommands * cmds,
uint32_t first_vertex,
uint32_t vertex_count,
uint32_t first_instance,
uint32_t instance_count
);
| Field | Type | Description |
|---|---|---|
cmds |
DvzCommands * |
the set of command buffers to record |
first_vertex |
uint32_t |
index of the first vertex |
vertex_count |
uint32_t |
number of vertices to draw |
first_instance |
uint32_t |
index of the first instance |
instance_count |
uint32_t |
number of instances to draw |
Declared in include/datoviz/vklite/rendering.h:277.
dvz_cmd_draw_indexed()¶
Direct indexed draw.
void dvz_cmd_draw_indexed(
DvzCommands * cmds,
uint32_t first_index,
int32_t vertex_offset,
uint32_t index_count,
uint32_t first_instance,
uint32_t instance_count
);
| Field | Type | Description |
|---|---|---|
cmds |
DvzCommands * |
the set of command buffers to record |
first_index |
uint32_t |
index of the first index |
vertex_offset |
int32_t |
offset of the vertex |
index_count |
uint32_t |
number of indices to draw |
first_instance |
uint32_t |
index of the first instance |
instance_count |
uint32_t |
number of instances to draw |
Declared in include/datoviz/vklite/rendering.h:293.
dvz_cmd_draw_indexed_indirect()¶
Indirect indexed draw.
void dvz_cmd_draw_indexed_indirect(
DvzCommands * cmds,
VkBuffer indirect,
DvzSize offset,
uint32_t draw_count,
DvzSize stride
);
| Field | Type | Description |
|---|---|---|
cmds |
DvzCommands * |
the set of command buffers to record |
indirect |
VkBuffer |
buffer containing VkDrawIndexedIndirectCommand records |
offset |
DvzSize |
byte offset of the first record within indirect |
draw_count |
uint32_t |
number of draw records to execute |
stride |
DvzSize |
byte stride between successive records |
Declared in include/datoviz/vklite/rendering.h:322.
dvz_cmd_draw_indirect()¶
Indirect draw.
void dvz_cmd_draw_indirect(
DvzCommands * cmds,
VkBuffer indirect,
DvzSize offset,
uint32_t draw_count,
DvzSize stride
);
| Field | Type | Description |
|---|---|---|
cmds |
DvzCommands * |
the set of command buffers to record |
indirect |
VkBuffer |
buffer containing VkDrawIndirectCommand records |
offset |
DvzSize |
byte offset of the first record within indirect |
draw_count |
uint32_t |
number of draw records to execute |
stride |
DvzSize |
byte stride between successive records |
Declared in include/datoviz/vklite/rendering.h:308.
dvz_cmd_end()¶
Stop recording the currently selected owned command buffer.
This convenience wrapper logs failures from dvz_cmd_end_result(). It must not be used with an externally owned command buffer wrapped as already recording.
void dvz_cmd_end(
DvzCommands * cmds
);
| Field | Type | Description |
|---|---|---|
cmds |
DvzCommands * |
the set of command buffers |
Declared in include/datoviz/vklite/commands.h:190.
dvz_cmd_end_result()¶
Stop recording the currently selected owned command buffer.
This operation is rejected for an externally owned command buffer wrapped as already recording.
int dvz_cmd_end_result(
DvzCommands * cmds
);
| Field | Type | Description |
|---|---|---|
| return | int |
0 on success, non-zero on Vulkan or state failure |
cmds |
DvzCommands * |
the set of command buffers |
Declared in include/datoviz/vklite/commands.h:178.
dvz_cmd_release()¶
Release the command buffers back to the Vulkan command pool.
The wrapper itself remains alive; call dvz_commands_destroy() to also tear down the underlying pool and dvz_commands_free() to reclaim the heap wrapper allocation.
void dvz_cmd_release(
DvzCommands * cmds
);
| Field | Type | Description |
|---|---|---|
cmds |
DvzCommands * |
the set of command buffers |
Declared in include/datoviz/vklite/commands.h:214.
dvz_cmd_rendering_begin()¶
Begin a rendering.
void dvz_cmd_rendering_begin(
DvzCommands * cmds,
DvzRendering * rendering
);
| Field | Type | Description |
|---|---|---|
cmds |
DvzCommands * |
the command buffers |
rendering |
DvzRendering * |
the rendering |
Declared in include/datoviz/vklite/rendering.h:226.
dvz_cmd_rendering_default()¶
Set up a default rendering.
void dvz_cmd_rendering_default(
DvzCommands * cmds,
VkImageView image_view,
uint32_t width,
uint32_t height,
VkClearValue clear_value,
DvzRendering * rendering
);
| Field | Type | Description |
|---|---|---|
cmds |
DvzCommands * |
the command buffers |
image_view |
VkImageView |
the Vulkan image view |
width |
uint32_t |
the image width |
height |
uint32_t |
the image height |
clear_value |
VkClearValue |
the clear value |
rendering |
DvzRendering * |
the rendering |
Declared in include/datoviz/vklite/rendering.h:240.
dvz_cmd_rendering_end()¶
End a rendering.
void dvz_cmd_rendering_end(
DvzCommands * cmds
);
| Field | Type | Description |
|---|---|---|
cmds |
DvzCommands * |
the command buffers |
Declared in include/datoviz/vklite/rendering.h:251.
dvz_cmd_reset()¶
Reset the currently selected owned command buffer.
Do not call this on a borrowed recording command buffer.
void dvz_cmd_reset(
DvzCommands * cmds
);
| Field | Type | Description |
|---|---|---|
cmds |
DvzCommands * |
the set of command buffers |
Declared in include/datoviz/vklite/commands.h:201.
dvz_cmd_submit()¶
Submit a command buffer on its queue.
This function blocks the queue so it is not optimal.
void dvz_cmd_submit(
DvzCommands * cmds
);
| Field | Type | Description |
|---|---|---|
cmds |
DvzCommands * |
the set of command buffers |
Declared in include/datoviz/vklite/commands.h:237.
dvz_cmd_submit_result()¶
Submit a command buffer on its queue.
This function blocks the queue so it is not optimal.
int dvz_cmd_submit_result(
DvzCommands * cmds
);
| Field | Type | Description |
|---|---|---|
| return | int |
0 on success, non-zero on Vulkan or state failure |
cmds |
DvzCommands * |
the set of command buffers |
Declared in include/datoviz/vklite/commands.h:226.
dvz_command_buffer_alloc()¶
Allocate a single primary command buffer from the device command pool of a queue family.
VkCommandBuffer dvz_command_buffer_alloc(
DvzDevice * device,
uint32_t queue_family
);
| Field | Type | Description |
|---|---|---|
| return | VkCommandBuffer |
owned command buffer, or VK_NULL_HANDLE on failure; free it with dvz_command_buffer_free() |
device |
DvzDevice * |
logical device that owns the selected command pool |
queue_family |
uint32_t |
queue family index used to select the command pool |
Declared in include/datoviz/vklite/commands.h:100.
dvz_command_buffer_free()¶
Free a single command buffer from the device command pool of a queue family.
void dvz_command_buffer_free(
DvzDevice * device,
uint32_t queue_family,
VkCommandBuffer cmd
);
| Field | Type | Description |
|---|---|---|
device |
DvzDevice * |
logical device whose command pool owns cmd |
queue_family |
uint32_t |
queue family index used to select the command pool |
cmd |
VkCommandBuffer |
command buffer to free |
Declared in include/datoviz/vklite/commands.h:112.
dvz_commands()¶
Create a set of command buffers.
The status is INIT when the command buffers are initialized, and CREATED when they are filled. Reinitializing a live wrapper requires dvz_commands_destroy() first.
void dvz_commands(
DvzDevice * device,
DvzQueue * queue,
uint32_t count,
DvzCommands * cmds
);
| Field | Type | Description |
|---|---|---|
device |
DvzDevice * |
logical device that owns the command pool and buffers; must outlive cmds |
queue |
DvzQueue * |
queue whose family selects the command pool and on which submissions are made; must outlive cmds |
count |
uint32_t |
the number of command buffers to create |
cmds |
DvzCommands * |
Declared in include/datoviz/vklite/commands.h:88.
dvz_commands_count()¶
Return the number of command buffers managed by a wrapper.
uint32_t dvz_commands_count(
DvzCommands * cmds
);
| Field | Type | Description |
|---|---|---|
| return | uint32_t |
number of command buffers owned or wrapped by cmds |
cmds |
DvzCommands * |
the set of command buffers |
Declared in include/datoviz/vklite/commands.h:132.
dvz_commands_create_wrapper()¶
Allocate an empty commands wrapper.
Heap-allocated wrappers follow the same lifecycle as stack-owned wrappers: initialize with dvz_commands(), record or wrap existing command buffers, destroy when done, and free only if this wrapper came from dvz_commands_create_wrapper().
DvzCommands * dvz_commands_create_wrapper(void);
| Field | Type | Description |
|---|---|---|
| return | DvzCommands * |
allocated commands wrapper, or NULL on allocation failure |
Declared in include/datoviz/vklite/commands.h:62.
dvz_commands_current()¶
Set the current command buffer index.
void dvz_commands_current(
DvzCommands * cmds,
uint32_t current
);
| Field | Type | Description |
|---|---|---|
cmds |
DvzCommands * |
the set of command buffers |
current |
uint32_t |
command-buffer index in [0, dvz_commands_count(cmds)) |
Declared in include/datoviz/vklite/commands.h:142.
dvz_commands_destroy()¶
Destroy a set of command buffers.
This releases the wrapped Vulkan command buffers and returns the wrapper to a reusable initialized state.
void dvz_commands_destroy(
DvzCommands * cmds
);
| Field | Type | Description |
|---|---|---|
cmds |
DvzCommands * |
the set of command buffers |
Declared in include/datoviz/vklite/commands.h:249.
dvz_commands_free()¶
Free a commands wrapper allocated by dvz_commands_create_wrapper().
void dvz_commands_free(
DvzCommands * cmds
);
| Field | Type | Description |
|---|---|---|
cmds |
DvzCommands * |
commands wrapper to free |
Declared in include/datoviz/vklite/commands.h:71.
dvz_commands_handle()¶
Return the Vulkan handle of the currently-selected command buffers.
VkCommandBuffer dvz_commands_handle(
DvzCommands * cmds
);
| Field | Type | Description |
|---|---|---|
| return | VkCommandBuffer |
borrowed handle of the currently selected command buffer |
cmds |
DvzCommands * |
the set of command buffers |
Declared in include/datoviz/vklite/commands.h:122.
dvz_commands_wrap()¶
Wrap an existing Vulkan command buffer in a DvzCommands struct.
The wrapped command buffer remains externally owned. This helper is intended for command buffers whose owner grants recording-control operations such as begin, end, or reset. Queue submission is not supported for wrappers created by this function because no queue is supplied.
void dvz_commands_wrap(
DvzDevice * device,
VkCommandBuffer vk_cmd,
DvzCommands * cmds
);
| Field | Type | Description |
|---|---|---|
device |
DvzDevice * |
logical device associated with vk_cmd; must outlive cmds |
vk_cmd |
VkCommandBuffer |
externally owned command buffer whose owner permits recording-control operations |
cmds |
DvzCommands * |
Declared in include/datoviz/vklite/commands.h:264.
dvz_commands_wrap_borrowed_recording()¶
Wrap an externally-owned Vulkan command buffer that is already recording.
The returned wrapper may be passed to vklite command-recording helpers only. Calls that would begin, end, reset, submit, or destroy the borrowed command buffer are rejected before touching Vulkan.
void dvz_commands_wrap_borrowed_recording(
DvzDevice * device,
VkCommandBuffer vk_cmd,
DvzCommands * cmds
);
| Field | Type | Description |
|---|---|---|
device |
DvzDevice * |
logical device associated with vk_cmd; must outlive cmds |
vk_cmd |
VkCommandBuffer |
externally owned command buffer that is already in the recording state |
cmds |
DvzCommands * |
Declared in include/datoviz/vklite/commands.h:279.
dvz_rendering()¶
Initialize or reset a rendering wrapper.
Reinitialization clears any previously configured attachment state so callers can safely reuse the wrapper across recording passes without relying on direct struct mutation.
void dvz_rendering(
DvzRendering * rendering
);
| Field | Type | Description |
|---|---|---|
rendering |
DvzRendering * |
the rendering |
Declared in include/datoviz/vklite/rendering.h:121.
dvz_rendering_area()¶
Set a rendering area.
void dvz_rendering_area(
DvzRendering * rendering,
int32_t x,
int32_t y,
uint32_t width,
uint32_t height
);
| Field | Type | Description |
|---|---|---|
rendering |
DvzRendering * |
the rendering |
x |
int32_t |
the offset x |
y |
int32_t |
the offset y |
width |
uint32_t |
the width |
height |
uint32_t |
the height |
Declared in include/datoviz/vklite/rendering.h:135.
dvz_rendering_color()¶
Return a color attachment of a rendering.
DvzAttachment * dvz_rendering_color(
DvzRendering * rendering,
uint32_t idx
);
| Field | Type | Description |
|---|---|---|
| return | DvzAttachment * |
the attachment |
rendering |
DvzRendering * |
the rendering |
idx |
uint32_t |
the color attachment index |
Declared in include/datoviz/vklite/rendering.h:196.
dvz_rendering_color_count()¶
Return the number of configured color attachments.
uint32_t dvz_rendering_color_count(
DvzRendering * rendering
);
| Field | Type | Description |
|---|---|---|
| return | uint32_t |
the color attachment count |
rendering |
DvzRendering * |
the rendering |
Declared in include/datoviz/vklite/rendering.h:155.
dvz_rendering_create_wrapper()¶
Allocate an empty rendering wrapper.
DvzRendering is intentionally opaque. It owns a coupled rendering-state bundle whose attachment arrays and cached Vulkan structs are kept consistent through the public API rather than direct field mutation.
DvzRendering * dvz_rendering_create_wrapper(void);
| Field | Type | Description |
|---|---|---|
| return | DvzRendering * |
allocated rendering wrapper, or NULL on allocation failure |
Declared in include/datoviz/vklite/rendering.h:109.
dvz_rendering_depth()¶
Return the depth attachment of a rendering.
DvzAttachment * dvz_rendering_depth(
DvzRendering * rendering
);
| Field | Type | Description |
|---|---|---|
| return | DvzAttachment * |
the attachment |
rendering |
DvzRendering * |
the rendering |
Declared in include/datoviz/vklite/rendering.h:206.
dvz_rendering_free()¶
Free a rendering wrapper allocated by dvz_rendering_create().
void dvz_rendering_free(
DvzRendering * rendering
);
| Field | Type | Description |
|---|---|---|
rendering |
DvzRendering * |
rendering wrapper to free |
Declared in include/datoviz/vklite/rendering.h:260.
dvz_rendering_has_depth()¶
Return whether a depth attachment is configured.
_Bool dvz_rendering_has_depth(
DvzRendering * rendering
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
true when a depth attachment is configured |
rendering |
DvzRendering * |
the rendering |
Declared in include/datoviz/vklite/rendering.h:175.
dvz_rendering_has_stencil()¶
Return whether a stencil attachment is configured.
_Bool dvz_rendering_has_stencil(
DvzRendering * rendering
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
true when a stencil attachment is configured |
rendering |
DvzRendering * |
the rendering |
Declared in include/datoviz/vklite/rendering.h:185.
dvz_rendering_layer_count()¶
Return the configured layer count.
uint32_t dvz_rendering_layer_count(
DvzRendering * rendering
);
| Field | Type | Description |
|---|---|---|
| return | uint32_t |
the layer count |
rendering |
DvzRendering * |
the rendering |
Declared in include/datoviz/vklite/rendering.h:165.
dvz_rendering_layers()¶
Set the number of layers in a rendering.
void dvz_rendering_layers(
DvzRendering * rendering,
uint32_t count
);
| Field | Type | Description |
|---|---|---|
rendering |
DvzRendering * |
the rendering |
count |
uint32_t |
the number of layers |
Declared in include/datoviz/vklite/rendering.h:145.
dvz_rendering_stencil()¶
Return the stencil attachment of a rendering.
DvzAttachment * dvz_rendering_stencil(
DvzRendering * rendering
);
| Field | Type | Description |
|---|---|---|
| return | DvzAttachment * |
the attachment |
rendering |
DvzRendering * |
the rendering |
Declared in include/datoviz/vklite/rendering.h:216.
Types
DvzAttachment · typedef
typedef struct VkRenderingAttachmentInfo DvzAttachment;
Declared in include/datoviz/vklite/rendering.h:38.
DvzCommands · typedef
typedef struct DvzCommands DvzCommands;
Declared in include/datoviz/vklite/commands.h.
DvzRendering · typedef
typedef struct DvzRendering DvzRendering;
Declared in include/datoviz/vklite/rendering.h:39.
Device And Presentation¶
Functions
dvz_surface_capabilities()¶
Return the cached surface capabilities snapshot.
VkSurfaceCapabilitiesKHR dvz_surface_capabilities(
const DvzSurface * surface
);
| Field | Type | Description |
|---|---|---|
| return | VkSurfaceCapabilitiesKHR |
cached capabilities value |
surface |
const DvzSurface * |
surface wrapper |
Declared in include/datoviz/vklite/surface.h:140.
dvz_surface_create_wrapper()¶
Allocate an empty surface wrapper.
DvzSurface * dvz_surface_create_wrapper(void);
| Field | Type | Description |
|---|---|---|
| return | DvzSurface * |
allocated surface wrapper, or NULL on allocation failure |
Declared in include/datoviz/vklite/surface.h:50.
dvz_surface_destroy()¶
Destroy a surface wrapper cache.
void dvz_surface_destroy(
DvzSurface * surface
);
| Field | Type | Description |
|---|---|---|
surface |
DvzSurface * |
surface wrapper to destroy |
Declared in include/datoviz/vklite/surface.h:236.
dvz_surface_extent()¶
Return the current cached extent resolved during refresh.
VkExtent2D dvz_surface_extent(
const DvzSurface * surface
);
| Field | Type | Description |
|---|---|---|
| return | VkExtent2D |
cached surface extent |
surface |
const DvzSurface * |
surface wrapper |
Declared in include/datoviz/vklite/surface.h:227.
dvz_surface_format()¶
Fetch a cached supported format by index.
_Bool dvz_surface_format(
const DvzSurface * surface,
uint32_t format_idx,
VkSurfaceFormatKHR * format
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
true when the index is valid |
surface |
const DvzSurface * |
surface wrapper |
format_idx |
uint32_t |
format index in the cached list |
format |
VkSurfaceFormatKHR * |
Declared in include/datoviz/vklite/surface.h:163.
dvz_surface_format_count()¶
Return the number of cached supported surface formats.
uint32_t dvz_surface_format_count(
const DvzSurface * surface
);
| Field | Type | Description |
|---|---|---|
| return | uint32_t |
number of cached formats |
surface |
const DvzSurface * |
surface wrapper |
Declared in include/datoviz/vklite/surface.h:150.
dvz_surface_free()¶
Free a surface wrapper allocated by dvz_surface_create().
void dvz_surface_free(
DvzSurface * surface
);
| Field | Type | Description |
|---|---|---|
surface |
DvzSurface * |
surface wrapper to free |
Declared in include/datoviz/vklite/surface.h:245.
dvz_surface_handle()¶
Return the wrapped native Vulkan surface handle.
VkSurfaceKHR dvz_surface_handle(
const DvzSurface * surface
);
| Field | Type | Description |
|---|---|---|
| return | VkSurfaceKHR |
wrapped VkSurfaceKHR handle or VK_NULL_HANDLE |
surface |
const DvzSurface * |
surface wrapper |
Declared in include/datoviz/vklite/surface.h:130.
dvz_surface_has_present_mode()¶
Return whether a present mode is supported by the cached list.
_Bool dvz_surface_has_present_mode(
const DvzSurface * surface,
VkPresentModeKHR mode
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
true when the mode exists in the cached list |
surface |
const DvzSurface * |
surface wrapper |
mode |
VkPresentModeKHR |
present mode to query |
Declared in include/datoviz/vklite/surface.h:207.
dvz_surface_init_from_device()¶
Initialize a surface wrapper from a logical device.
_Bool dvz_surface_init_from_device(
DvzSurface * surface,
DvzDevice * device,
uint32_t queue_family
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
true when initialization succeeds |
surface |
DvzSurface * |
surface wrapper to initialize |
device |
DvzDevice * |
logical device used to resolve its physical GPU |
queue_family |
uint32_t |
queue family used for present support queries |
Declared in include/datoviz/vklite/surface.h:77.
dvz_surface_init_from_instance()¶
Initialize a surface wrapper from instance + GPU index selection.
_Bool dvz_surface_init_from_instance(
DvzSurface * surface,
DvzInstance * instance,
uint32_t gpu_index,
uint32_t queue_family
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
true when initialization succeeds |
surface |
DvzSurface * |
surface wrapper to initialize |
instance |
DvzInstance * |
source instance used to resolve the GPU |
gpu_index |
uint32_t |
selected GPU index in the instance |
queue_family |
uint32_t |
queue family used for present support queries |
Declared in include/datoviz/vklite/surface.h:63.
dvz_surface_preferred_format()¶
Return the preferred surface format selected during refresh.
VkSurfaceFormatKHR dvz_surface_preferred_format(
const DvzSurface * surface
);
| Field | Type | Description |
|---|---|---|
| return | VkSurfaceFormatKHR |
preferred cached format |
surface |
const DvzSurface * |
surface wrapper |
Declared in include/datoviz/vklite/surface.h:173.
dvz_surface_preferred_present_mode()¶
Return the preferred present mode selected during refresh.
VkPresentModeKHR dvz_surface_preferred_present_mode(
const DvzSurface * surface
);
| Field | Type | Description |
|---|---|---|
| return | VkPresentModeKHR |
preferred cached present mode |
surface |
const DvzSurface * |
surface wrapper |
Declared in include/datoviz/vklite/surface.h:217.
dvz_surface_present_mode()¶
Fetch a cached supported present mode by index.
_Bool dvz_surface_present_mode(
const DvzSurface * surface,
uint32_t mode_idx,
VkPresentModeKHR * mode
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
true when the index is valid |
surface |
const DvzSurface * |
surface wrapper |
mode_idx |
uint32_t |
present mode index in the cached list |
mode |
VkPresentModeKHR * |
Declared in include/datoviz/vklite/surface.h:196.
dvz_surface_present_mode_count()¶
Return the number of cached supported present modes.
uint32_t dvz_surface_present_mode_count(
const DvzSurface * surface
);
| Field | Type | Description |
|---|---|---|
| return | uint32_t |
number of cached present modes |
surface |
const DvzSurface * |
surface wrapper |
Declared in include/datoviz/vklite/surface.h:183.
dvz_surface_ready()¶
Return whether the surface wrapper currently has a valid cached state.
_Bool dvz_surface_ready(
const DvzSurface * surface
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
true when the wrapper is ready for swapchain queries |
surface |
const DvzSurface * |
surface wrapper |
Declared in include/datoviz/vklite/surface.h:120.
dvz_surface_refresh()¶
Refresh cached capabilities, formats, and present modes.
_Bool dvz_surface_refresh(
DvzSurface * surface
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
true when refresh succeeds |
surface |
DvzSurface * |
surface wrapper to refresh |
Declared in include/datoviz/vklite/surface.h:110.
dvz_surface_set_extent_hint()¶
Update the extent hint used when a wrapped surface reports variable extent.
void dvz_surface_set_extent_hint(
DvzSurface * surface,
const VkExtent2D * extent_hint
);
| Field | Type | Description |
|---|---|---|
surface |
DvzSurface * |
surface wrapper to update |
extent_hint |
const VkExtent2D * |
optional extent override, NULL clears the hint |
Declared in include/datoviz/vklite/surface.h:100.
dvz_surface_wrap_native()¶
Attach a native surface created by the window module to a surface wrapper.
_Bool dvz_surface_wrap_native(
DvzSurface * surface,
VkSurfaceKHR surface_khr,
const VkExtent2D * extent_hint
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
true when the wrapper accepts the native surface |
surface |
DvzSurface * |
surface wrapper to configure |
surface_khr |
VkSurfaceKHR |
native Vulkan surface handle owned by the window module |
extent_hint |
const VkExtent2D * |
optional extent used when the surface reports variable extent |
Declared in include/datoviz/vklite/surface.h:89.
dvz_swapchain_acquire()¶
Acquire the next image index from the swapchain.
DvzPresentStatus dvz_swapchain_acquire(
DvzSwapchain * swapchain,
VkSemaphore image_available,
uint64_t timeout_ns,
uint32_t * image_idx
);
| Field | Type | Description |
|---|---|---|
| return | DvzPresentStatus |
present status mapping acquire outcome |
swapchain |
DvzSwapchain * |
swapchain wrapper |
image_available |
VkSemaphore |
semaphore signaled by Vulkan when image is available |
timeout_ns |
uint64_t |
timeout value passed to Vulkan acquire call |
image_idx |
uint32_t * |
Declared in include/datoviz/vklite/swapchain.h:247.
dvz_swapchain_color_space()¶
Return the resolved color space from the latest recreate.
VkColorSpaceKHR dvz_swapchain_color_space(
const DvzSwapchain * swapchain
);
| Field | Type | Description |
|---|---|---|
| return | VkColorSpaceKHR |
resolved color space |
swapchain |
const DvzSwapchain * |
swapchain wrapper |
Declared in include/datoviz/vklite/swapchain.h:166.
dvz_swapchain_config()¶
Set swapchain creation parameters.
_Bool dvz_swapchain_config(
DvzSwapchain * swapchain,
DvzSwapchainConfig config
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
true when configuration is accepted |
swapchain |
DvzSwapchain * |
swapchain wrapper to configure |
config |
DvzSwapchainConfig |
desired swapchain configuration |
Declared in include/datoviz/vklite/swapchain.h:116.
dvz_swapchain_create_wrapper()¶
Allocate an empty swapchain wrapper.
DvzSwapchain * dvz_swapchain_create_wrapper(void);
| Field | Type | Description |
|---|---|---|
| return | DvzSwapchain * |
allocated swapchain wrapper, or NULL on allocation failure |
Declared in include/datoviz/vklite/swapchain.h:79.
dvz_swapchain_destroy()¶
Destroy swapchain resources owned by vklite.
void dvz_swapchain_destroy(
DvzSwapchain * swapchain
);
| Field | Type | Description |
|---|---|---|
swapchain |
DvzSwapchain * |
swapchain wrapper to destroy |
Declared in include/datoviz/vklite/swapchain.h:271.
dvz_swapchain_device()¶
Bind or override the Vulkan logical device used by swapchain create/destroy/acquire paths.
_Bool dvz_swapchain_device(
DvzSwapchain * swapchain,
VkDevice device
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
true when binding succeeds |
swapchain |
DvzSwapchain * |
swapchain wrapper to configure |
device |
VkDevice |
logical device used to issue swapchain API calls |
Declared in include/datoviz/vklite/swapchain.h:105.
dvz_swapchain_extent()¶
Return the current swapchain extent from the latest recreate.
VkExtent2D dvz_swapchain_extent(
const DvzSwapchain * swapchain
);
| Field | Type | Description |
|---|---|---|
| return | VkExtent2D |
current resolved extent |
swapchain |
const DvzSwapchain * |
swapchain wrapper |
Declared in include/datoviz/vklite/swapchain.h:196.
dvz_swapchain_free()¶
Free a swapchain wrapper allocated by dvz_swapchain_create().
void dvz_swapchain_free(
DvzSwapchain * swapchain
);
| Field | Type | Description |
|---|---|---|
swapchain |
DvzSwapchain * |
swapchain wrapper to free |
Declared in include/datoviz/vklite/swapchain.h:280.
dvz_swapchain_get_config()¶
Return the currently configured swapchain creation parameters.
DvzSwapchainConfig dvz_swapchain_get_config(
const DvzSwapchain * swapchain
);
| Field | Type | Description |
|---|---|---|
| return | DvzSwapchainConfig |
currently stored config |
swapchain |
const DvzSwapchain * |
swapchain wrapper |
Declared in include/datoviz/vklite/swapchain.h:186.
dvz_swapchain_handle()¶
Return the wrapped Vulkan swapchain handle.
VkSwapchainKHR dvz_swapchain_handle(
const DvzSwapchain * swapchain
);
| Field | Type | Description |
|---|---|---|
| return | VkSwapchainKHR |
wrapped VkSwapchainKHR handle or VK_NULL_HANDLE |
swapchain |
const DvzSwapchain * |
swapchain wrapper |
Declared in include/datoviz/vklite/swapchain.h:136.
dvz_swapchain_image()¶
Fetch a swapchain image handle by index.
_Bool dvz_swapchain_image(
const DvzSwapchain * swapchain,
uint32_t image_idx,
VkImage * image
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
true when the index is valid |
swapchain |
const DvzSwapchain * |
swapchain wrapper |
image_idx |
uint32_t |
image index |
image |
VkImage * |
Declared in include/datoviz/vklite/swapchain.h:209.
dvz_swapchain_image_count()¶
Return the number of swapchain images in the current recreation state.
uint32_t dvz_swapchain_image_count(
const DvzSwapchain * swapchain
);
| Field | Type | Description |
|---|---|---|
| return | uint32_t |
swapchain image count |
swapchain |
const DvzSwapchain * |
swapchain wrapper |
Declared in include/datoviz/vklite/swapchain.h:146.
dvz_swapchain_image_format()¶
Return the resolved image format from the latest recreate.
VkFormat dvz_swapchain_image_format(
const DvzSwapchain * swapchain
);
| Field | Type | Description |
|---|---|---|
| return | VkFormat |
resolved image format |
swapchain |
const DvzSwapchain * |
swapchain wrapper |
Declared in include/datoviz/vklite/swapchain.h:156.
dvz_swapchain_image_view()¶
Fetch a swapchain image view handle by index.
_Bool dvz_swapchain_image_view(
const DvzSwapchain * swapchain,
uint32_t image_idx,
VkImageView * image_view
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
true when the index is valid |
swapchain |
const DvzSwapchain * |
swapchain wrapper |
image_idx |
uint32_t |
image index |
image_view |
VkImageView * |
Declared in include/datoviz/vklite/swapchain.h:222.
dvz_swapchain_init_from_device()¶
Initialize a swapchain wrapper from a logical device and surface.
_Bool dvz_swapchain_init_from_device(
DvzSwapchain * swapchain,
DvzDevice * device,
DvzSurface * surface
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
true when initialization succeeds |
swapchain |
DvzSwapchain * |
swapchain wrapper to initialize |
device |
DvzDevice * |
logical device used to resolve the physical GPU |
surface |
DvzSurface * |
surface wrapper used for capability and extent data |
Declared in include/datoviz/vklite/swapchain.h:93.
dvz_swapchain_present()¶
Present a previously rendered image.
DvzPresentStatus dvz_swapchain_present(
DvzSwapchain * swapchain,
VkQueue present_queue,
uint32_t image_idx,
VkSemaphore render_finished
);
| Field | Type | Description |
|---|---|---|
| return | DvzPresentStatus |
present status mapping present outcome |
swapchain |
DvzSwapchain * |
swapchain wrapper |
present_queue |
VkQueue |
queue used for present submission |
image_idx |
uint32_t |
image index to present |
render_finished |
VkSemaphore |
semaphore waited before presentation |
Declared in include/datoviz/vklite/swapchain.h:261.
dvz_swapchain_present_mode()¶
Return the resolved present mode from the latest recreate.
VkPresentModeKHR dvz_swapchain_present_mode(
const DvzSwapchain * swapchain
);
| Field | Type | Description |
|---|---|---|
| return | VkPresentModeKHR |
resolved present mode |
swapchain |
const DvzSwapchain * |
swapchain wrapper |
Declared in include/datoviz/vklite/swapchain.h:176.
dvz_swapchain_ready()¶
Return whether the swapchain wrapper currently owns valid Vulkan resources.
_Bool dvz_swapchain_ready(
const DvzSwapchain * swapchain
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
true when swapchain resources are ready for acquire/present |
swapchain |
const DvzSwapchain * |
swapchain wrapper |
Declared in include/datoviz/vklite/swapchain.h:126.
dvz_swapchain_recreate()¶
Recreate swapchain images and image views for a new extent.
DvzPresentStatus dvz_swapchain_recreate(
DvzSwapchain * swapchain,
uvec2 size
);
| Field | Type | Description |
|---|---|---|
| return | DvzPresentStatus |
present status mapping recreate outcome |
swapchain |
DvzSwapchain * |
swapchain wrapper to recreate |
size |
uvec2 |
target extent as |
Declared in include/datoviz/vklite/swapchain.h:234.
Types
DvzPresentStatus · enum
enum DvzPresentStatus {
DVZ_PRESENT_STATUS_OK = 0,
DVZ_PRESENT_STATUS_RECREATE = 1,
DVZ_PRESENT_STATUS_SKIP_ZERO_EXTENT = 2,
DVZ_PRESENT_STATUS_DEVICE_LOST = 3,
DVZ_PRESENT_STATUS_ERROR = 4,
};
Declared in include/datoviz/vklite/swapchain.h:43.
DvzSurface · typedef
typedef struct DvzSurface DvzSurface;
Declared in include/datoviz/vklite/surface.h:33.
DvzSwapchain · typedef
typedef struct DvzSwapchain DvzSwapchain;
Declared in include/datoviz/vklite/swapchain.h:34.
DvzSwapchainConfig · record
struct DvzSwapchainConfig {
VkFormat image_format;
VkColorSpaceKHR color_space;
VkPresentModeKHR present_mode;
VkImageUsageFlags image_usage;
VkCompositeAlphaFlagBitsKHR composite_alpha;
uint32_t min_image_count;
_Bool clipped;
};
Declared in include/datoviz/vklite/swapchain.h:54.
Pipelines And Bindings¶
Functions
dvz_compute()¶
Initialize a compute pipeline.
This prepares the wrapper for configuration. Call dvz_compute_create() once after setting the shader module and pipeline layout. Recreating a live compute pipeline requires dvz_compute_destroy() first.
void dvz_compute(
DvzDevice * device,
DvzCompute * compute
);
| Field | Type | Description |
|---|---|---|
device |
DvzDevice * |
the device |
compute |
DvzCompute * |
Declared in include/datoviz/vklite/compute.h:80.
dvz_compute_create()¶
Create a compute pipeline after it has been set up.
This function creates the wrapped Vulkan pipeline exactly once per live wrapper. Call dvz_compute_destroy() before attempting to create it again.
int dvz_compute_create(
DvzCompute * compute
);
| Field | Type | Description |
|---|---|---|
| return | int |
the creation result code |
compute |
DvzCompute * |
the compute pipeline |
Related: dvz_compute_destroy().
Declared in include/datoviz/vklite/compute.h:127.
dvz_compute_create_wrapper()¶
Allocate an empty compute wrapper.
Heap-allocated wrappers follow the same lifecycle as stack-owned wrappers: initialize with dvz_compute(), configure, call dvz_compute_create() once, then destroy before any recreate and free only if this wrapper came from dvz_compute_create_wrapper().
DvzCompute * dvz_compute_create_wrapper(void);
| Field | Type | Description |
|---|---|---|
| return | DvzCompute * |
allocated compute wrapper, or NULL on allocation failure |
Declared in include/datoviz/vklite/compute.h:66.
dvz_compute_destroy()¶
Destroy a compute pipeline.
This releases the wrapped Vulkan pipeline and returns the wrapper to a reusable initialized state.
void dvz_compute_destroy(
DvzCompute * compute
);
| Field | Type | Description |
|---|---|---|
compute |
DvzCompute * |
the compute pipeline |
Related: dvz_compute_create().
Declared in include/datoviz/vklite/compute.h:159.
dvz_compute_free()¶
Free a compute wrapper allocated by dvz_compute_create_wrapper().
void dvz_compute_free(
DvzCompute * compute
);
| Field | Type | Description |
|---|---|---|
compute |
DvzCompute * |
compute wrapper to free |
Declared in include/datoviz/vklite/compute.h:168.
dvz_compute_handle()¶
Return the Vulkan pipeline handle owned by a compute wrapper.
VkPipeline dvz_compute_handle(
DvzCompute * compute
);
| Field | Type | Description |
|---|---|---|
| return | VkPipeline |
borrowed Vulkan pipeline handle, or VK_NULL_HANDLE when not created |
compute |
DvzCompute * |
the compute pipeline |
Declared in include/datoviz/vklite/compute.h:137.
dvz_compute_layout()¶
Set the pipeline layout.
void dvz_compute_layout(
DvzCompute * compute,
VkPipelineLayout layout
);
| Field | Type | Description |
|---|---|---|
compute |
DvzCompute * |
the compute pipeline |
layout |
VkPipelineLayout |
the pipeline layout |
Declared in include/datoviz/vklite/compute.h:100.
dvz_compute_layout_handle()¶
Return the pipeline layout bound to a compute wrapper.
VkPipelineLayout dvz_compute_layout_handle(
DvzCompute * compute
);
| Field | Type | Description |
|---|---|---|
| return | VkPipelineLayout |
borrowed pipeline-layout handle, or VK_NULL_HANDLE when unset |
compute |
DvzCompute * |
the compute pipeline |
Declared in include/datoviz/vklite/compute.h:147.
dvz_compute_shader()¶
Set the shader module.
void dvz_compute_shader(
DvzCompute * compute,
VkShaderModule module
);
| Field | Type | Description |
|---|---|---|
compute |
DvzCompute * |
the compute pipeline |
module |
VkShaderModule |
borrowed compute shader module; it must remain live through pipeline creation |
Declared in include/datoviz/vklite/compute.h:90.
dvz_compute_spec()¶
Set a specialization constant.
void dvz_compute_spec(
DvzCompute * compute,
uint32_t index,
DvzSize offset,
DvzSize size,
void * data
);
| Field | Type | Description |
|---|---|---|
compute |
DvzCompute * |
the compute pipeline |
index |
uint32_t |
the specialization constant index in the shader |
offset |
DvzSize |
the offset, in bytes, of that constant, without the specialization constant data |
size |
DvzSize |
the size of the specialization constant value |
data |
void * |
the value of the constant |
Declared in include/datoviz/vklite/compute.h:114.
dvz_descriptors()¶
Initialize and allocate descriptors.
This is a one-shot pool-backed allocation helper. The wrapper does not own the descriptor pool and does not provide an independent Vulkan destroy entry point. Descriptor sets remain valid only while the parent device/pool stays alive, and callers must not allocate into the same wrapper twice without discarding it and starting from a fresh wrapper. This intentionally differs from the heavier create/destroy/free wrappers used for buffers, images, pipelines, and samplers.
void dvz_descriptors(
DvzSlots * slots,
DvzDescriptors * descriptors
);
| Field | Type | Description |
|---|---|---|
slots |
DvzSlots * |
the slots |
descriptors |
DvzDescriptors * |
Declared in include/datoviz/vklite/descriptors.h:76.
dvz_descriptors_buffer()¶
Bind a buffer.
void dvz_descriptors_buffer(
DvzDescriptors * descriptors,
uint32_t set,
uint32_t binding,
uint32_t array_idx,
VkBuffer buffer,
DvzSize offset,
DvzSize size
);
| Field | Type | Description |
|---|---|---|
descriptors |
DvzDescriptors * |
the descriptors |
set |
uint32_t |
the descriptor set index |
binding |
uint32_t |
the descriptor binding index |
array_idx |
uint32_t |
the array index |
buffer |
VkBuffer |
the buffer |
offset |
DvzSize |
the offset, in bytes |
size |
DvzSize |
the size, in bytes |
Declared in include/datoviz/vklite/descriptors.h:112.
dvz_descriptors_create_wrapper()¶
Allocate an empty descriptor wrapper.
This wrapper is intentionally lightweight: it refers to descriptor sets allocated from the device-owned descriptor pool rather than owning an independent Vulkan object with a separate destroy path.
DvzDescriptors * dvz_descriptors_create_wrapper(void);
| Field | Type | Description |
|---|---|---|
| return | DvzDescriptors * |
allocated descriptor wrapper, or NULL on allocation failure |
Declared in include/datoviz/vklite/descriptors.h:59.
dvz_descriptors_free()¶
Free a descriptor wrapper allocated by dvz_descriptors_create().
This releases the CPU-side wrapper and returns its Vulkan descriptor sets to the parent device-owned descriptor pool. The wrapper must be freed before the parent device is destroyed.
void dvz_descriptors_free(
DvzDescriptors * descriptors
);
| Field | Type | Description |
|---|---|---|
descriptors |
DvzDescriptors * |
descriptor wrapper to free |
Declared in include/datoviz/vklite/descriptors.h:160.
dvz_descriptors_handle()¶
Return a Vulkan descriptor-set handle by set index.
VkDescriptorSet dvz_descriptors_handle(
DvzDescriptors * descriptors,
uint32_t set
);
| Field | Type | Description |
|---|---|---|
| return | VkDescriptorSet |
borrowed descriptor-set handle; set must be less than dvz_descriptors_set_count() |
descriptors |
DvzDescriptors * |
the descriptors |
set |
uint32_t |
the descriptor set index |
Declared in include/datoviz/vklite/descriptors.h:97.
dvz_descriptors_image()¶
Bind an image.
void dvz_descriptors_image(
DvzDescriptors * descriptors,
uint32_t set,
uint32_t binding,
uint32_t array_idx,
VkImageLayout layout,
VkImageView view,
VkSampler sampler
);
| Field | Type | Description |
|---|---|---|
descriptors |
DvzDescriptors * |
the descriptors |
set |
uint32_t |
the descriptor set index |
binding |
uint32_t |
the descriptor binding index |
array_idx |
uint32_t |
the array index |
layout |
VkImageLayout |
the image layout |
view |
VkImageView |
the image view |
sampler |
VkSampler |
the sampler |
Declared in include/datoviz/vklite/descriptors.h:129.
dvz_descriptors_set_count()¶
Return the number of descriptor sets allocated by the wrapper.
uint32_t dvz_descriptors_set_count(
DvzDescriptors * descriptors
);
| Field | Type | Description |
|---|---|---|
| return | uint32_t |
the descriptor set count |
descriptors |
DvzDescriptors * |
the descriptors |
Declared in include/datoviz/vklite/descriptors.h:86.
dvz_graphics()¶
Initialize a graphics pipeline.
This prepares the wrapper for configuration. Call dvz_graphics_create() once after setting shaders, layout, and fixed-function state. Recreating a live graphics pipeline requires dvz_graphics_destroy() first.
void dvz_graphics(
DvzDevice * device,
DvzGraphics * graphics
);
| Field | Type | Description |
|---|---|---|
device |
DvzDevice * |
the device |
graphics |
DvzGraphics * |
Declared in include/datoviz/vklite/graphics.h:100.
dvz_graphics_attachment_color()¶
Declare the format of a color attachment.
void dvz_graphics_attachment_color(
DvzGraphics * graphics,
uint32_t idx,
VkFormat format
);
| Field | Type | Description |
|---|---|---|
graphics |
DvzGraphics * |
the graphics pipeline |
idx |
uint32_t |
the color attachment index |
format |
VkFormat |
the format |
Declared in include/datoviz/vklite/graphics.h:140.
dvz_graphics_attachment_depth()¶
Declare the format of a depth attachment.
void dvz_graphics_attachment_depth(
DvzGraphics * graphics,
VkFormat format
);
| Field | Type | Description |
|---|---|---|
graphics |
DvzGraphics * |
the graphics pipeline |
format |
VkFormat |
the format |
Declared in include/datoviz/vklite/graphics.h:150.
dvz_graphics_attachment_stencil()¶
Declare the format of a stencil attachment.
void dvz_graphics_attachment_stencil(
DvzGraphics * graphics,
VkFormat format
);
| Field | Type | Description |
|---|---|---|
graphics |
DvzGraphics * |
the graphics pipeline |
format |
VkFormat |
the format |
Declared in include/datoviz/vklite/graphics.h:160.
dvz_graphics_blend()¶
Set the blending constants for the pipeline.
void dvz_graphics_blend(
DvzGraphics * graphics,
vec4 constants,
DvzGraphicsFlags flags
);
| Field | Type | Description |
|---|---|---|
graphics |
DvzGraphics * |
the graphics pipeline |
constants |
vec4 |
the blending constants |
flags |
DvzGraphicsFlags |
indicate whether the blend constants are fixed or dynamic state set in the command buffer |
Declared in include/datoviz/vklite/graphics.h:369.
dvz_graphics_blend_alpha()¶
Set the alpha blending parameters of a color attachment.
void dvz_graphics_blend_alpha(
DvzGraphics * graphics,
uint32_t idx,
VkBlendFactor src,
VkBlendFactor dst,
VkBlendOp op
);
| Field | Type | Description |
|---|---|---|
graphics |
DvzGraphics * |
the graphics pipeline |
idx |
uint32_t |
the attachment index |
src |
VkBlendFactor |
the source alpha blend factor |
dst |
VkBlendFactor |
the destination alpha blend factor |
op |
VkBlendOp |
the alpha blend operation |
Declared in include/datoviz/vklite/graphics.h:398.
dvz_graphics_blend_color()¶
Set the color blending parameters of a color attachment.
void dvz_graphics_blend_color(
DvzGraphics * graphics,
uint32_t idx,
VkBlendFactor src,
VkBlendFactor dst,
VkBlendOp op,
VkColorComponentFlags mask
);
| Field | Type | Description |
|---|---|---|
graphics |
DvzGraphics * |
the graphics pipeline |
idx |
uint32_t |
the attachment index |
src |
VkBlendFactor |
the source color blend factor |
dst |
VkBlendFactor |
the destination color blend factor |
op |
VkBlendOp |
the color blend operation |
mask |
VkColorComponentFlags |
the color write mask |
Declared in include/datoviz/vklite/graphics.h:383.
dvz_graphics_color_attachment_count()¶
Return the number of configured color attachments on a graphics wrapper.
uint32_t dvz_graphics_color_attachment_count(
DvzGraphics * graphics
);
| Field | Type | Description |
|---|---|---|
| return | uint32_t |
the color-attachment count |
graphics |
DvzGraphics * |
the graphics pipeline |
Declared in include/datoviz/vklite/graphics.h:479.
dvz_graphics_color_write_mask()¶
Set the color write mask of a color attachment.
void dvz_graphics_color_write_mask(
DvzGraphics * graphics,
uint32_t idx,
VkColorComponentFlags mask
);
| Field | Type | Description |
|---|---|---|
graphics |
DvzGraphics * |
the graphics pipeline |
idx |
uint32_t |
the attachment index |
mask |
VkColorComponentFlags |
the color write mask |
Declared in include/datoviz/vklite/graphics.h:411.
dvz_graphics_create()¶
Create a graphics pipeline after it has been set up.
This function creates the wrapped Vulkan pipeline exactly once per live wrapper. Call dvz_graphics_destroy() before attempting to create it again.
int dvz_graphics_create(
DvzGraphics * graphics
);
| Field | Type | Description |
|---|---|---|
| return | int |
the creation result code |
graphics |
DvzGraphics * |
the graphics pipeline |
Related: dvz_graphics_destroy().
Declared in include/datoviz/vklite/graphics.h:439.
dvz_graphics_create_wrapper()¶
Allocate an empty graphics wrapper.
Heap-allocated wrappers follow the same lifecycle as stack-owned wrappers: initialize with dvz_graphics(), configure, call dvz_graphics_create() once, then destroy before any recreate and free only if this wrapper came from dvz_graphics_create_wrapper().
DvzGraphics * dvz_graphics_create_wrapper(void);
| Field | Type | Description |
|---|---|---|
| return | DvzGraphics * |
allocated graphics wrapper, or NULL on allocation failure |
Declared in include/datoviz/vklite/graphics.h:86.
dvz_graphics_cull_mode()¶
Set the graphics cull mode.
void dvz_graphics_cull_mode(
DvzGraphics * graphics,
VkCullModeFlags cull_mode,
DvzGraphicsFlags flags
);
| Field | Type | Description |
|---|---|---|
graphics |
DvzGraphics * |
the graphics pipeline |
cull_mode |
VkCullModeFlags |
the cull mode |
flags |
DvzGraphicsFlags |
indicate whether this setting is fixed or dynamic state set in the command buffer |
Declared in include/datoviz/vklite/graphics.h:246.
dvz_graphics_depth()¶
Set the depth test.
void dvz_graphics_depth(
DvzGraphics * graphics,
_Bool clamp,
_Bool depth_write,
VkCompareOp compare,
DvzGraphicsFlags flags
);
| Field | Type | Description |
|---|---|---|
graphics |
DvzGraphics * |
the graphics pipeline |
clamp |
_Bool |
enable or disable depth clamp |
depth_write |
_Bool |
enable or disable the depth write |
compare |
VkCompareOp |
depth compare operation |
flags |
DvzGraphicsFlags |
indicate whether this setting is fixed or dynamic state set in the command buffer |
Declared in include/datoviz/vklite/graphics.h:272.
dvz_graphics_depth_bias()¶
Enable or disable the depth bias.
void dvz_graphics_depth_bias(
DvzGraphics * graphics,
float constant_factor,
float clamp,
float slope_factor,
DvzGraphicsFlags flags
);
| Field | Type | Description |
|---|---|---|
graphics |
DvzGraphics * |
the graphics pipeline |
constant_factor |
float |
the depth bias constant factor |
clamp |
float |
the depth bias clamp |
slope_factor |
float |
the depth bias slope factor |
flags |
DvzGraphicsFlags |
indicate whether this setting is fixed or dynamic state set in the command buffer |
Declared in include/datoviz/vklite/graphics.h:300.
dvz_graphics_depth_bounds()¶
Set the depth bounds.
void dvz_graphics_depth_bounds(
DvzGraphics * graphics,
float min,
float max,
DvzGraphicsFlags flags
);
| Field | Type | Description |
|---|---|---|
graphics |
DvzGraphics * |
the graphics pipieline |
min |
float |
the minimum depth bound |
max |
float |
the maximum depth bound |
flags |
DvzGraphicsFlags |
indicate whether this setting is fixed or dynamic state set in the command buffer |
Declared in include/datoviz/vklite/graphics.h:287.
dvz_graphics_destroy()¶
Destroy a graphics pipeline.
This releases the wrapped Vulkan pipeline and returns the wrapper to a reusable initialized state.
void dvz_graphics_destroy(
DvzGraphics * graphics
);
| Field | Type | Description |
|---|---|---|
graphics |
DvzGraphics * |
the graphics pipeline |
Related: dvz_graphics_create().
Declared in include/datoviz/vklite/graphics.h:491.
dvz_graphics_free()¶
Free a graphics wrapper allocated by dvz_graphics_create_wrapper().
void dvz_graphics_free(
DvzGraphics * graphics
);
| Field | Type | Description |
|---|---|---|
graphics |
DvzGraphics * |
graphics wrapper to free |
Declared in include/datoviz/vklite/graphics.h:500.
dvz_graphics_front_face()¶
Set the graphics front face.
void dvz_graphics_front_face(
DvzGraphics * graphics,
VkFrontFace front_face,
DvzGraphicsFlags flags
);
| Field | Type | Description |
|---|---|---|
graphics |
DvzGraphics * |
the graphics pipeline |
front_face |
VkFrontFace |
the front face |
flags |
DvzGraphicsFlags |
indicate whether this setting is fixed or dynamic state set in the command buffer |
Declared in include/datoviz/vklite/graphics.h:259.
dvz_graphics_handle()¶
Return the Vulkan pipeline handle owned by a graphics wrapper.
VkPipeline dvz_graphics_handle(
DvzGraphics * graphics
);
| Field | Type | Description |
|---|---|---|
| return | VkPipeline |
borrowed Vulkan pipeline handle, or VK_NULL_HANDLE when not created |
graphics |
DvzGraphics * |
the graphics pipeline |
Declared in include/datoviz/vklite/graphics.h:449.
dvz_graphics_layout()¶
Set the pipeline layout.
void dvz_graphics_layout(
DvzGraphics * graphics,
VkPipelineLayout layout
);
| Field | Type | Description |
|---|---|---|
graphics |
DvzGraphics * |
the graphics pipeline |
layout |
VkPipelineLayout |
the pipeline layout |
Declared in include/datoviz/vklite/graphics.h:197.
dvz_graphics_layout_handle()¶
Return the pipeline layout bound to a graphics wrapper.
VkPipelineLayout dvz_graphics_layout_handle(
DvzGraphics * graphics
);
| Field | Type | Description |
|---|---|---|
| return | VkPipelineLayout |
borrowed pipeline-layout handle, or VK_NULL_HANDLE when unset |
graphics |
DvzGraphics * |
the graphics pipeline |
Declared in include/datoviz/vklite/graphics.h:459.
dvz_graphics_multisampling()¶
Set multisampling.
void dvz_graphics_multisampling(
DvzGraphics * graphics,
VkSampleCountFlagBits samples,
float min_sample_shading,
_Bool alpha_coverage
);
| Field | Type | Description |
|---|---|---|
graphics |
DvzGraphics * |
the graphics pipeline |
samples |
VkSampleCountFlagBits |
the number of samples |
min_sample_shading |
float |
if >0, enable sample shading and set the minimum fraction of sample shading |
alpha_coverage |
_Bool |
alpha channel is used for relative sample coverage |
Declared in include/datoviz/vklite/graphics.h:424.
dvz_graphics_polygon_mode()¶
Set the graphics polygon mode.
void dvz_graphics_polygon_mode(
DvzGraphics * graphics,
VkPolygonMode polygon_mode,
DvzGraphicsFlags flags
);
| Field | Type | Description |
|---|---|---|
graphics |
DvzGraphics * |
the graphics pipeline |
polygon_mode |
VkPolygonMode |
the polygon mode |
flags |
DvzGraphicsFlags |
indicate whether this setting is fixed or dynamic state set in the command buffer |
Declared in include/datoviz/vklite/graphics.h:233.
dvz_graphics_primitive()¶
Set the graphics pipeline primitive topology
void dvz_graphics_primitive(
DvzGraphics * graphics,
VkPrimitiveTopology topology,
DvzGraphicsFlags flags
);
| Field | Type | Description |
|---|---|---|
graphics |
DvzGraphics * |
the graphics pipeline |
topology |
VkPrimitiveTopology |
the primitive topology |
flags |
DvzGraphicsFlags |
indicate whether this setting is fixed or dynamic state set in the command buffer |
Declared in include/datoviz/vklite/graphics.h:209.
dvz_graphics_primitive_restart()¶
Set whether a special index value (when using indexed rendering) allows to restart the primitive.
void dvz_graphics_primitive_restart(
DvzGraphics * graphics,
DvzGraphicsFlags flags
);
| Field | Type | Description |
|---|---|---|
graphics |
DvzGraphics * |
the graphics pipeline |
flags |
DvzGraphicsFlags |
indicate whether this setting is fixed or dynamic state set in the command buffer |
Declared in include/datoviz/vklite/graphics.h:221.
dvz_graphics_scissor()¶
Set the scissor.
void dvz_graphics_scissor(
DvzGraphics * graphics,
int32_t x,
int32_t y,
uint32_t width,
uint32_t height,
DvzGraphicsFlags flags
);
| Field | Type | Description |
|---|---|---|
graphics |
DvzGraphics * |
the graphics pipeline |
x |
int32_t |
the offset x |
y |
int32_t |
the offset y |
width |
uint32_t |
the width |
height |
uint32_t |
the height |
flags |
DvzGraphicsFlags |
indicate whether this setting is fixed or dynamic state set in the command buffer |
Declared in include/datoviz/vklite/graphics.h:337.
dvz_graphics_shader()¶
Set the path to a shader for a graphics pipeline.
void dvz_graphics_shader(
DvzGraphics * graphics,
VkShaderStageFlagBits stage,
VkShaderModule shader
);
| Field | Type | Description |
|---|---|---|
graphics |
DvzGraphics * |
the graphics pipeline |
stage |
VkShaderStageFlagBits |
the shader stage |
shader |
VkShaderModule |
the shader module |
Declared in include/datoviz/vklite/graphics.h:112.
dvz_graphics_shader_count()¶
Return the number of configured shader stages on a graphics wrapper.
uint32_t dvz_graphics_shader_count(
DvzGraphics * graphics
);
| Field | Type | Description |
|---|---|---|
| return | uint32_t |
the shader-stage count |
graphics |
DvzGraphics * |
the graphics pipeline |
Declared in include/datoviz/vklite/graphics.h:469.
dvz_graphics_spec()¶
Set a specialization constant.
void dvz_graphics_spec(
DvzGraphics * graphics,
VkShaderStageFlagBits stage,
uint32_t index,
DvzSize offset,
DvzSize size,
void * data
);
| Field | Type | Description |
|---|---|---|
graphics |
DvzGraphics * |
the graphics pipeline |
stage |
VkShaderStageFlagBits |
the shader stage |
index |
uint32_t |
the specialization constant index in the shader |
offset |
DvzSize |
the offset, in bytes, of that constant, without the specialization constant data |
size |
DvzSize |
the size of the specialization constant value |
data |
void * |
the value of the constant |
Declared in include/datoviz/vklite/graphics.h:126.
dvz_graphics_stencil()¶
Set the stencil test.
void dvz_graphics_stencil(
DvzGraphics * graphics,
VkStencilFaceFlags mask,
VkStencilOp fail,
VkStencilOp pass,
VkStencilOp depth_fail,
VkCompareOp compare,
uint32_t compare_mask,
uint32_t write_mask,
uint32_t reference,
DvzGraphicsFlags flags
);
| Field | Type | Description |
|---|---|---|
graphics |
DvzGraphics * |
the graphics pipeline |
mask |
VkStencilFaceFlags |
front or back |
fail |
VkStencilOp |
fail operation |
pass |
VkStencilOp |
pass operation |
depth_fail |
VkStencilOp |
depth fail operation |
compare |
VkCompareOp |
compare operation |
compare_mask |
uint32_t |
bits of the stencil values participating in the stencil test |
write_mask |
uint32_t |
bits of the stencil values updated by the stencil test in the attachment |
reference |
uint32_t |
stencil reference value |
flags |
DvzGraphicsFlags |
indicate whether this setting is fixed or dynamic state set in the command buffer |
Declared in include/datoviz/vklite/graphics.h:320.
dvz_graphics_vertex_attr()¶
Add a vertex attribute.
void dvz_graphics_vertex_attr(
DvzGraphics * graphics,
uint32_t binding,
uint32_t location,
VkFormat format,
DvzSize offset
);
| Field | Type | Description |
|---|---|---|
graphics |
DvzGraphics * |
the graphics pipeline |
binding |
uint32_t |
the binding index (as specified in the vertex shader) |
location |
uint32_t |
the location index (as specified in the vertex shader) |
format |
VkFormat |
the format |
offset |
DvzSize |
the offset, in bytes |
Declared in include/datoviz/vklite/graphics.h:186.
dvz_graphics_vertex_binding()¶
Set the vertex binding.
void dvz_graphics_vertex_binding(
DvzGraphics * graphics,
uint32_t binding,
DvzSize stride,
VkVertexInputRate input_rate
);
| Field | Type | Description |
|---|---|---|
graphics |
DvzGraphics * |
the graphics pipeline |
binding |
uint32_t |
the binding index |
stride |
DvzSize |
the stride in the vertex buffer, in bytes |
input_rate |
VkVertexInputRate |
the vertex input rate, VK_VERTEX_INPUT_RATE_VERTEX|INSTANCE |
Declared in include/datoviz/vklite/graphics.h:172.
dvz_graphics_viewport()¶
Set the viewport.
void dvz_graphics_viewport(
DvzGraphics * graphics,
float x,
float y,
float width,
float height,
float min_depth,
float max_depth,
DvzGraphicsFlags flags
);
| Field | Type | Description |
|---|---|---|
graphics |
DvzGraphics * |
the graphics pipeline |
x |
float |
the offset x |
y |
float |
the offset y |
width |
float |
the width |
height |
float |
the height |
min_depth |
float |
the minimum depth |
max_depth |
float |
the maximum depth |
flags |
DvzGraphicsFlags |
indicate whether this setting is fixed or dynamic state set in the command buffer |
Declared in include/datoviz/vklite/graphics.h:355.
dvz_shader()¶
Create a shader module.
This function creates the wrapped Vulkan shader module exactly once per live wrapper. Call dvz_shader_destroy() before attempting to create it again.
int dvz_shader(
DvzDevice * device,
DvzSize size,
const uint32_t * buffer,
DvzShader * shader
);
| Field | Type | Description |
|---|---|---|
| return | int |
0 on success, non-zero on Vulkan or Datoviz state failure |
device |
DvzDevice * |
the device |
size |
DvzSize |
the size of the buffer with the SPIR-V code, in bytes |
buffer |
const uint32_t * |
the buffer with the SPIR-V bytecode |
shader |
DvzShader * |
Declared in include/datoviz/vklite/shader.h:71.
dvz_shader_create_wrapper()¶
Allocate an empty shader wrapper.
Heap-allocated wrappers follow the same lifecycle as stack-owned wrappers: call dvz_shader() once per live wrapper, destroy before any recreate, and free only if this wrapper came from dvz_shader_create_wrapper().
DvzShader * dvz_shader_create_wrapper(void);
| Field | Type | Description |
|---|---|---|
| return | DvzShader * |
allocated shader wrapper, or NULL on allocation failure |
Declared in include/datoviz/vklite/shader.h:54.
dvz_shader_destroy()¶
Destroy a shader module.
This releases the wrapped Vulkan shader module and returns the wrapper to a reusable initialized state.
void dvz_shader_destroy(
DvzShader * shader
);
| Field | Type | Description |
|---|---|---|
shader |
DvzShader * |
the shader module |
Declared in include/datoviz/vklite/shader.h:93.
dvz_shader_free()¶
Free a shader wrapper allocated by dvz_shader_create_wrapper().
void dvz_shader_free(
DvzShader * shader
);
| Field | Type | Description |
|---|---|---|
shader |
DvzShader * |
shader wrapper to free |
Declared in include/datoviz/vklite/shader.h:102.
dvz_shader_handle()¶
Return the shader Vulkan handle.
VkShaderModule dvz_shader_handle(
DvzShader * shader
);
| Field | Type | Description |
|---|---|---|
| return | VkShaderModule |
borrowed shader-module handle, or VK_NULL_HANDLE when not created |
shader |
DvzShader * |
the shader |
Declared in include/datoviz/vklite/shader.h:81.
dvz_slots()¶
Initialize pipeline slots (aka Vulkan descriptor set layout).
This prepares the wrapper for configuration. Call dvz_slots_create() once after declaring bindings and push-constant ranges. Recreating live slots requires dvz_slots_destroy() first.
void dvz_slots(
DvzDevice * device,
DvzSlots * slots
);
| Field | Type | Description |
|---|---|---|
device |
DvzDevice * |
the device |
slots |
DvzSlots * |
Declared in include/datoviz/vklite/slots.h:79.
dvz_slots_binding()¶
Set the slots descriptor.
void dvz_slots_binding(
DvzSlots * slots,
uint32_t set,
uint32_t binding,
uint32_t array_count,
VkShaderStageFlags stages,
VkDescriptorType type
);
| Field | Type | Description |
|---|---|---|
slots |
DvzSlots * |
the slots |
set |
uint32_t |
the set index |
binding |
uint32_t |
the binding index within that set |
array_count |
uint32_t |
the number of descriptor if using descriptor arrays |
stages |
VkShaderStageFlags |
the shader stages to enable |
type |
VkDescriptorType |
the descriptor type for that slot |
Declared in include/datoviz/vklite/slots.h:93.
dvz_slots_binding_count()¶
Return the number of bindings configured for a descriptor set.
uint32_t dvz_slots_binding_count(
DvzSlots * slots,
uint32_t set
);
| Field | Type | Description |
|---|---|---|
| return | uint32_t |
the binding count for that set |
slots |
DvzSlots * |
the slots |
set |
uint32_t |
the descriptor-set index |
Declared in include/datoviz/vklite/slots.h:179.
dvz_slots_combined_pipeline_layout()¶
Create a pipeline layout that combines two existing descriptor set layouts.
The resulting pipeline layout covers set 0 (from layout0) and set 1 (from layout1). The returned VkPipelineLayout must be destroyed by the caller with vkDestroyPipelineLayout.
VkPipelineLayout dvz_slots_combined_pipeline_layout(
DvzDevice * device,
VkDescriptorSetLayout layout0,
VkDescriptorSetLayout layout1
);
| Field | Type | Description |
|---|---|---|
| return | VkPipelineLayout |
the combined pipeline layout, or VK_NULL_HANDLE on failure |
device |
DvzDevice * |
the device |
layout0 |
VkDescriptorSetLayout |
descriptor set layout for set 0 |
layout1 |
VkDescriptorSetLayout |
descriptor set layout for set 1 |
Declared in include/datoviz/vklite/slots.h:147.
dvz_slots_create()¶
Create the slots after they have been set up.
This function creates the wrapped Vulkan descriptor-set layouts and pipeline layout exactly once per live wrapper. Call dvz_slots_destroy() before attempting to create them again.
int dvz_slots_create(
DvzSlots * slots
);
| Field | Type | Description |
|---|---|---|
| return | int |
0 on success, non-zero on Vulkan or Datoviz state failure |
slots |
DvzSlots * |
the slots |
Related: dvz_slots_destroy().
Declared in include/datoviz/vklite/slots.h:122.
dvz_slots_create_wrapper()¶
Allocate an empty slots wrapper.
Heap-allocated wrappers follow the same lifecycle as stack-owned wrappers: initialize with dvz_slots(), configure, call dvz_slots_create() once, then destroy before any recreate and free only if this wrapper came from dvz_slots_create_wrapper().
DvzSlots * dvz_slots_create_wrapper(void);
| Field | Type | Description |
|---|---|---|
| return | DvzSlots * |
allocated slots wrapper, or NULL on allocation failure |
Declared in include/datoviz/vklite/slots.h:65.
dvz_slots_descriptor_type()¶
Return the descriptor type configured for a slot binding.
VkDescriptorType dvz_slots_descriptor_type(
DvzSlots * slots,
uint32_t set,
uint32_t binding
);
| Field | Type | Description |
|---|---|---|
| return | VkDescriptorType |
the descriptor type |
slots |
DvzSlots * |
the slots |
set |
uint32_t |
the descriptor-set index |
binding |
uint32_t |
the binding index within the set |
Declared in include/datoviz/vklite/slots.h:201.
dvz_slots_destroy()¶
Destroy the slots.
This releases the wrapped Vulkan layouts and returns the wrapper to a reusable initialized state.
void dvz_slots_destroy(
DvzSlots * slots
);
| Field | Type | Description |
|---|---|---|
slots |
DvzSlots * |
the slots |
Related: dvz_slots_create().
Declared in include/datoviz/vklite/slots.h:224.
dvz_slots_device()¶
Return the device that owns a slots wrapper.
DvzDevice * dvz_slots_device(
DvzSlots * slots
);
| Field | Type | Description |
|---|---|---|
| return | DvzDevice * |
borrowed owning device, valid at least as long as the slots wrapper |
slots |
DvzSlots * |
the slots |
Declared in include/datoviz/vklite/slots.h:158.
dvz_slots_free()¶
Free a slots wrapper allocated by dvz_slots_create_wrapper().
void dvz_slots_free(
DvzSlots * slots
);
| Field | Type | Description |
|---|---|---|
slots |
DvzSlots * |
slots wrapper to free |
Declared in include/datoviz/vklite/slots.h:233.
dvz_slots_handle()¶
Return the pipeline layout Vulkan handle.
VkPipelineLayout dvz_slots_handle(
DvzSlots * slots
);
| Field | Type | Description |
|---|---|---|
| return | VkPipelineLayout |
borrowed pipeline-layout handle, or VK_NULL_HANDLE when not created |
slots |
DvzSlots * |
the slots |
Declared in include/datoviz/vklite/slots.h:132.
dvz_slots_push()¶
Set up push constants.
void dvz_slots_push(
DvzSlots * slots,
VkShaderStageFlagBits stages,
DvzSize offset,
DvzSize size
);
| Field | Type | Description |
|---|---|---|
slots |
DvzSlots * |
the slots |
stages |
VkShaderStageFlagBits |
the slots stages that will access the push constant |
offset |
DvzSize |
the push constant offset, in bytes |
size |
DvzSize |
the push constant size, in bytes |
Declared in include/datoviz/vklite/slots.h:108.
dvz_slots_push_count()¶
Return the number of configured push-constant ranges.
uint32_t dvz_slots_push_count(
DvzSlots * slots
);
| Field | Type | Description |
|---|---|---|
| return | uint32_t |
the push-constant range count |
slots |
DvzSlots * |
the slots |
Declared in include/datoviz/vklite/slots.h:189.
dvz_slots_set_count()¶
Return the number of descriptor sets configured on a slots wrapper.
uint32_t dvz_slots_set_count(
DvzSlots * slots
);
| Field | Type | Description |
|---|---|---|
| return | uint32_t |
the descriptor-set count |
slots |
DvzSlots * |
the slots |
Declared in include/datoviz/vklite/slots.h:168.
dvz_slots_set_layout()¶
Return the descriptor-set layout handle for a set.
VkDescriptorSetLayout dvz_slots_set_layout(
DvzSlots * slots,
uint32_t set
);
| Field | Type | Description |
|---|---|---|
| return | VkDescriptorSetLayout |
borrowed descriptor-set layout; set must be less than DVZ_MAX_SETS |
slots |
DvzSlots * |
the slots |
set |
uint32_t |
the descriptor-set index |
Declared in include/datoviz/vklite/slots.h:212.
Types
DvzCompute · typedef
typedef struct DvzCompute DvzCompute;
Declared in include/datoviz/vklite/compute.h:45.
DvzDescriptors · typedef
typedef struct DvzDescriptors DvzDescriptors;
Declared in include/datoviz/vklite/descriptors.h:37.
DvzGraphics · typedef
typedef struct DvzGraphics DvzGraphics;
Declared in include/datoviz/vklite/graphics.h:38.
DvzGraphicsFlags · enum
enum DvzGraphicsFlags {
DVZ_GRAPHICS_FLAGS_DISABLE = 0,
DVZ_GRAPHICS_FLAGS_FIXED = 1,
DVZ_GRAPHICS_FLAGS_DYNAMIC = 2,
};
Declared in include/datoviz/vklite/graphics.h:60.
DvzShader · typedef
typedef struct DvzShader DvzShader;
Declared in include/datoviz/vklite/shader.h:34.
DvzSlots · typedef
typedef struct DvzSlots DvzSlots;
Declared in include/datoviz/vklite/graphics.h:37.
Resources¶
Functions
dvz_buffer()¶
Initialize a GPU buffer.
This prepares the wrapper for configuration. Call dvz_buffer_create() once after setting the desired size, usage, and allocation flags. Recreating a live buffer requires dvz_buffer_destroy() first.
void dvz_buffer(
DvzDevice * device,
DvzVma * allocator,
DvzBuffer * buffer
);
| Field | Type | Description |
|---|---|---|
device |
DvzDevice * |
logical device that owns the Vulkan buffer; must outlive buffer |
allocator |
DvzVma * |
allocator used for buffer memory; must outlive the created buffer |
buffer |
DvzBuffer * |
Declared in include/datoviz/vklite/buffers.h:97.
dvz_buffer_allocated_size()¶
Return the current allocated size of a buffer, in bytes.
DvzSize dvz_buffer_allocated_size(
DvzBuffer * buffer
);
| Field | Type | Description |
|---|---|---|
| return | DvzSize |
allocated size in bytes |
buffer |
DvzBuffer * |
the buffer |
Declared in include/datoviz/vklite/buffers.h:82.
dvz_buffer_create()¶
Create the buffer after it has been set.
This function creates the wrapped Vulkan buffer exactly once per live wrapper. Call dvz_buffer_destroy() before attempting to create it again.
int dvz_buffer_create(
DvzBuffer * buffer
);
| Field | Type | Description |
|---|---|---|
| return | int |
0 on success, non-zero on Vulkan or Datoviz state failure |
buffer |
DvzBuffer * |
configured, not-yet-created buffer wrapper |
Related: dvz_buffer_destroy().
Declared in include/datoviz/vklite/buffers.h:140.
dvz_buffer_create_wrapper()¶
Allocate an empty buffer wrapper.
Heap-allocated wrappers follow the same lifecycle as stack-owned wrappers: initialize with dvz_buffer(), configure, call dvz_buffer_create() once, then destroy before any recreate and free only if this wrapper came from dvz_buffer_create_wrapper().
DvzBuffer * dvz_buffer_create_wrapper(void);
| Field | Type | Description |
|---|---|---|
| return | DvzBuffer * |
allocated buffer wrapper, or NULL on allocation failure |
Declared in include/datoviz/vklite/buffers.h:63.
dvz_buffer_destroy()¶
Destroy a buffer.
This releases the wrapped Vulkan buffer and returns the wrapper to a reusable initialized state.
void dvz_buffer_destroy(
DvzBuffer * buffer
);
| Field | Type | Description |
|---|---|---|
buffer |
DvzBuffer * |
live buffer to destroy; the wrapper itself is retained |
Related: dvz_buffer_create().
Declared in include/datoviz/vklite/buffers.h:238.
dvz_buffer_download()¶
Download a buffer data to the CPU.
Important
This function does not use any GPU synchronization primitive: this is the responsibility of the caller.
void dvz_buffer_download(
DvzBuffer * buffer,
DvzSize offset,
DvzSize size,
void * data
);
| Field | Type | Description |
|---|---|---|
buffer |
DvzBuffer * |
live host-visible source buffer |
offset |
DvzSize |
the offset within the buffer, in bytes |
size |
DvzSize |
the size of the region to download, in bytes |
data |
void * |
Declared in include/datoviz/vklite/buffers.h:226.
dvz_buffer_flags()¶
Set the allocation policy flags used when the buffer creates its memory.
void dvz_buffer_flags(
DvzBuffer * buffer,
DvzAllocationFlags flags
);
| Field | Type | Description |
|---|---|---|
buffer |
DvzBuffer * |
initialized, not-yet-created buffer wrapper |
flags |
DvzAllocationFlags |
Datoviz allocation policy flags |
Declared in include/datoviz/vklite/buffers.h:127.
dvz_buffer_free()¶
Free a buffer wrapper allocated by dvz_buffer_create_wrapper().
void dvz_buffer_free(
DvzBuffer * buffer
);
| Field | Type | Description |
|---|---|---|
buffer |
DvzBuffer * |
buffer wrapper to free |
Declared in include/datoviz/vklite/buffers.h:72.
dvz_buffer_handle()¶
Return a Vulkan handle to a buffer.
VkBuffer dvz_buffer_handle(
DvzBuffer * buffer
);
| Field | Type | Description |
|---|---|---|
| return | VkBuffer |
borrowed Vulkan buffer handle, or VK_NULL_HANDLE when no buffer is live |
buffer |
DvzBuffer * |
live buffer wrapper |
Declared in include/datoviz/vklite/buffers.h:150.
dvz_buffer_map()¶
Memmap a GPU buffer.
int dvz_buffer_map(
DvzBuffer * buffer
);
| Field | Type | Description |
|---|---|---|
| return | int |
0 on success, non-zero on Vulkan or Datoviz state failure |
buffer |
DvzBuffer * |
live host-visible buffer |
Declared in include/datoviz/vklite/buffers.h:184.
dvz_buffer_resize()¶
Resize a buffer.
The requested logical size is updated only on a valid buffer. This helper does not preserve existing contents, remap host pointers, or recreate a live Vulkan buffer; destroy and create the buffer again after changing size. Shrinking follows the same recreate contract as growing.
void dvz_buffer_resize(
DvzBuffer * buffer,
DvzSize size
);
| Field | Type | Description |
|---|---|---|
buffer |
DvzBuffer * |
the buffer |
size |
DvzSize |
the new buffer size, in bytes |
Declared in include/datoviz/vklite/buffers.h:174.
dvz_buffer_size()¶
Set the buffer size.
void dvz_buffer_size(
DvzBuffer * buffer,
DvzSize size
);
| Field | Type | Description |
|---|---|---|
buffer |
DvzBuffer * |
initialized, not-yet-created buffer wrapper |
size |
DvzSize |
the buffer size, in bytes |
Declared in include/datoviz/vklite/buffers.h:107.
dvz_buffer_size_value()¶
Return the requested logical size of a buffer, in bytes.
DvzSize dvz_buffer_size_value(
DvzBuffer * buffer
);
| Field | Type | Description |
|---|---|---|
| return | DvzSize |
requested logical size in bytes |
buffer |
DvzBuffer * |
initialized buffer wrapper |
Declared in include/datoviz/vklite/buffers.h:160.
dvz_buffer_unmap()¶
Unmap a GPU buffer.
void dvz_buffer_unmap(
DvzBuffer * buffer
);
| Field | Type | Description |
|---|---|---|
buffer |
DvzBuffer * |
mapped host-visible buffer; no action is taken when it is not mapped |
Declared in include/datoviz/vklite/buffers.h:193.
dvz_buffer_upload()¶
Upload data to a GPU buffer.
Important
This function does not use any GPU synchronization primitive: this is the responsibility of the caller.
void dvz_buffer_upload(
DvzBuffer * buffer,
DvzSize offset,
DvzSize size,
const void * data
);
| Field | Type | Description |
|---|---|---|
buffer |
DvzBuffer * |
live host-visible destination buffer |
offset |
DvzSize |
the offset within the buffer, in bytes |
size |
DvzSize |
number of bytes to copy |
data |
const void * |
source host-memory region containing at least size bytes |
Declared in include/datoviz/vklite/buffers.h:210.
dvz_buffer_usage()¶
Set the buffer usage.
void dvz_buffer_usage(
DvzBuffer * buffer,
VkBufferUsageFlags usage
);
| Field | Type | Description |
|---|---|---|
buffer |
DvzBuffer * |
initialized, not-yet-created buffer wrapper |
usage |
VkBufferUsageFlags |
Vulkan usage flags for the buffer |
Declared in include/datoviz/vklite/buffers.h:117.
dvz_buffer_views()¶
Create buffer views on an existing GPU buffer.
void dvz_buffer_views(
DvzBuffer * buffer,
uint32_t count,
DvzSize offset,
DvzSize size,
DvzSize alignment,
DvzBufferViews * views
);
| Field | Type | Description |
|---|---|---|
buffer |
DvzBuffer * |
live buffer borrowed by the views; it must outlive views |
count |
uint32_t |
the number of successive views |
offset |
DvzSize |
byte offset of the first view within buffer |
size |
DvzSize |
the size of each view, in bytes |
alignment |
DvzSize |
the alignment requirement for the view offsets |
views |
DvzBufferViews * |
Declared in include/datoviz/vklite/buffers.h:261.
dvz_buffer_views_aligned_size()¶
Return the aligned stride in bytes between successive views.
DvzSize dvz_buffer_views_aligned_size(
DvzBufferViews * views
);
| Field | Type | Description |
|---|---|---|
| return | DvzSize |
the aligned stride in bytes, or 0 when no alignment was requested |
views |
DvzBufferViews * |
the buffer views |
Declared in include/datoviz/vklite/buffers.h:293.
dvz_buffer_views_count()¶
Return the number of logical views configured in a buffer-views wrapper.
uint32_t dvz_buffer_views_count(
DvzBufferViews * views
);
| Field | Type | Description |
|---|---|---|
| return | uint32_t |
the number of configured views |
views |
DvzBufferViews * |
the buffer views |
Declared in include/datoviz/vklite/buffers.h:273.
dvz_buffer_views_create()¶
Allocate an empty buffer-views wrapper.
DvzBufferViews * dvz_buffer_views_create(void);
| Field | Type | Description |
|---|---|---|
| return | DvzBufferViews * |
allocated buffer-views wrapper, or NULL on allocation failure |
Declared in include/datoviz/vklite/buffers.h:247.
dvz_buffer_views_free()¶
Free a buffer-views wrapper allocated by dvz_buffer_views_create().
void dvz_buffer_views_free(
DvzBufferViews * views
);
| Field | Type | Description |
|---|---|---|
views |
DvzBufferViews * |
buffer-views wrapper to free |
Declared in include/datoviz/vklite/buffers.h:313.
dvz_buffer_views_offset()¶
Return the byte offset of a configured view.
DvzSize dvz_buffer_views_offset(
DvzBufferViews * views,
uint32_t idx
);
| Field | Type | Description |
|---|---|---|
| return | DvzSize |
the byte offset of the selected view |
views |
DvzBufferViews * |
the buffer views |
idx |
uint32_t |
the logical view index |
Declared in include/datoviz/vklite/buffers.h:304.
dvz_buffer_views_size()¶
Return the size in bytes of each configured logical view.
DvzSize dvz_buffer_views_size(
DvzBufferViews * views
);
| Field | Type | Description |
|---|---|---|
| return | DvzSize |
the logical view size in bytes |
views |
DvzBufferViews * |
the buffer views |
Declared in include/datoviz/vklite/buffers.h:283.
dvz_image_blit()¶
Reset an image-blit wrapper to its default state.
void dvz_image_blit(
DvzImageBlit * blit
);
| Field | Type | Description |
|---|---|---|
blit |
DvzImageBlit * |
the image-blit wrapper |
Declared in include/datoviz/vklite/images.h:505.
dvz_image_blit_create()¶
Allocate an empty image-blit wrapper.
DvzImageBlit * dvz_image_blit_create(void);
| Field | Type | Description |
|---|---|---|
| return | DvzImageBlit * |
allocated image-blit wrapper, or NULL on allocation failure |
Declared in include/datoviz/vklite/images.h:496.
dvz_image_blit_free()¶
Free an image-blit wrapper allocated by dvz_image_blit_create().
void dvz_image_blit_free(
DvzImageBlit * blit
);
| Field | Type | Description |
|---|---|---|
blit |
DvzImageBlit * |
image-blit wrapper to free |
Declared in include/datoviz/vklite/images.h:514.
dvz_image_copy()¶
Reset an image-copy wrapper to its default state.
void dvz_image_copy(
DvzImageCopy * copy
);
| Field | Type | Description |
|---|---|---|
copy |
DvzImageCopy * |
the image-copy wrapper |
Declared in include/datoviz/vklite/images.h:478.
dvz_image_copy_create()¶
Allocate an empty image-copy wrapper.
DvzImageCopy * dvz_image_copy_create(void);
| Field | Type | Description |
|---|---|---|
| return | DvzImageCopy * |
allocated image-copy wrapper, or NULL on allocation failure |
Declared in include/datoviz/vklite/images.h:469.
dvz_image_copy_free()¶
Free an image-copy wrapper allocated by dvz_image_copy_create().
void dvz_image_copy_free(
DvzImageCopy * copy
);
| Field | Type | Description |
|---|---|---|
copy |
DvzImageCopy * |
image-copy wrapper to free |
Declared in include/datoviz/vklite/images.h:487.
dvz_image_handle()¶
Return the Vulkan handle of an image.
VkImage dvz_image_handle(
DvzImages * img,
uint32_t idx
);
| Field | Type | Description |
|---|---|---|
| return | VkImage |
borrowed Vulkan image handle, possibly VK_NULL_HANDLE when not created |
img |
DvzImages * |
the images |
idx |
uint32_t |
image index in [0, dvz_images_count(img)) |
Declared in include/datoviz/vklite/images.h:230.
dvz_image_region()¶
Initialize an image region.
void dvz_image_region(
DvzImageRegion * region
);
| Field | Type | Description |
|---|---|---|
region |
DvzImageRegion * |
the image region |
Declared in include/datoviz/vklite/images.h:399.
dvz_image_region_aspect()¶
Set the image region aspect.
void dvz_image_region_aspect(
DvzImageRegion * region,
VkImageAspectFlags aspect
);
| Field | Type | Description |
|---|---|---|
region |
DvzImageRegion * |
the image region |
aspect |
VkImageAspectFlags |
the aspect mask |
Declared in include/datoviz/vklite/images.h:434.
dvz_image_region_extent()¶
Set the image region extent.
void dvz_image_region_extent(
DvzImageRegion * region,
uint32_t w,
uint32_t h,
uint32_t d
);
| Field | Type | Description |
|---|---|---|
region |
DvzImageRegion * |
the image region |
w |
uint32_t |
the width |
h |
uint32_t |
the height |
d |
uint32_t |
the depth |
Declared in include/datoviz/vklite/images.h:424.
dvz_image_region_layers()¶
Set the array layers of the image region.
void dvz_image_region_layers(
DvzImageRegion * region,
uint32_t base_layer,
uint32_t layer_count
);
| Field | Type | Description |
|---|---|---|
region |
DvzImageRegion * |
the image region |
base_layer |
uint32_t |
the base layer |
layer_count |
uint32_t |
the number of layers |
Declared in include/datoviz/vklite/images.h:456.
dvz_image_region_mip()¶
Set the MIP level of the image region.
void dvz_image_region_mip(
DvzImageRegion * region,
uint32_t mip
);
| Field | Type | Description |
|---|---|---|
region |
DvzImageRegion * |
the image region |
mip |
uint32_t |
the MIP level |
Declared in include/datoviz/vklite/images.h:444.
dvz_image_region_offset()¶
Set the image region offset.
void dvz_image_region_offset(
DvzImageRegion * region,
int32_t x,
int32_t y,
int32_t z
);
| Field | Type | Description |
|---|---|---|
region |
DvzImageRegion * |
the image region |
x |
int32_t |
offset x |
y |
int32_t |
offset y |
z |
int32_t |
offset z |
Declared in include/datoviz/vklite/images.h:411.
dvz_image_views()¶
Initialize image views for an existing images wrapper.
This prepares the wrapper for configuration. Call dvz_image_views_create() once after setting the desired view type, aspect, and subresource range. Recreating live image views requires dvz_image_views_destroy() first.
void dvz_image_views(
DvzImages * img,
DvzImageViews * views
);
| Field | Type | Description |
|---|---|---|
img |
DvzImages * |
the images |
views |
DvzImageViews * |
Declared in include/datoviz/vklite/images.h:297.
dvz_image_views_aspect()¶
Set the image views aspect.
void dvz_image_views_aspect(
DvzImageViews * views,
VkImageAspectFlags aspect
);
| Field | Type | Description |
|---|---|---|
views |
DvzImageViews * |
the image views |
aspect |
VkImageAspectFlags |
the aspect |
Declared in include/datoviz/vklite/images.h:317.
dvz_image_views_count()¶
Return the number of image views owned by a views wrapper.
uint32_t dvz_image_views_count(
DvzImageViews * views
);
| Field | Type | Description |
|---|---|---|
| return | uint32_t |
the image-view count |
views |
DvzImageViews * |
the image views |
Declared in include/datoviz/vklite/images.h:374.
dvz_image_views_create()¶
Create image views.
This function creates the wrapped Vulkan image views exactly once per live wrapper. Call dvz_image_views_destroy() before attempting to create them again.
int dvz_image_views_create(
DvzImageViews * views
);
| Field | Type | Description |
|---|---|---|
| return | int |
0 on success, non-zero on Vulkan or Datoviz state failure |
views |
DvzImageViews * |
the image views |
Related: dvz_image_views_destroy().
Declared in include/datoviz/vklite/images.h:353.
dvz_image_views_create_wrapper()¶
Allocate an empty image-view wrapper.
Heap-allocated wrappers follow the same lifecycle as stack-owned wrappers: initialize with dvz_image_views(), configure, call dvz_image_views_create() once, then destroy before any recreate and free only if this wrapper came from dvz_image_views_create_wrapper().
DvzImageViews * dvz_image_views_create_wrapper(void);
| Field | Type | Description |
|---|---|---|
| return | DvzImageViews * |
allocated image-view wrapper, or NULL on allocation failure |
Declared in include/datoviz/vklite/images.h:89.
dvz_image_views_destroy()¶
Destroy image views.
This releases the wrapped Vulkan image views and returns the wrapper to a reusable initialized state.
void dvz_image_views_destroy(
DvzImageViews * views
);
| Field | Type | Description |
|---|---|---|
views |
DvzImageViews * |
the image views |
Related: dvz_image_views_create().
Declared in include/datoviz/vklite/images.h:386.
dvz_image_views_free()¶
Free an image-view wrapper allocated by dvz_image_views_create_wrapper().
void dvz_image_views_free(
DvzImageViews * views
);
| Field | Type | Description |
|---|---|---|
views |
DvzImageViews * |
image-view wrapper to free |
Declared in include/datoviz/vklite/images.h:98.
dvz_image_views_handle()¶
Return the Vulkan handle of an image view.
VkImageView dvz_image_views_handle(
DvzImageViews * views,
uint32_t idx
);
| Field | Type | Description |
|---|---|---|
| return | VkImageView |
borrowed Vulkan image-view handle, possibly VK_NULL_HANDLE when not created |
views |
DvzImageViews * |
the image views |
idx |
uint32_t |
the image view index |
Declared in include/datoviz/vklite/images.h:364.
dvz_image_views_layers()¶
Set the array layers for the views.
void dvz_image_views_layers(
DvzImageViews * views,
uint32_t base,
uint32_t count
);
| Field | Type | Description |
|---|---|---|
views |
DvzImageViews * |
the image views |
base |
uint32_t |
the array layer base |
count |
uint32_t |
the array layer count |
Declared in include/datoviz/vklite/images.h:339.
dvz_image_views_mip()¶
Set the MIP levels for the views.
void dvz_image_views_mip(
DvzImageViews * views,
uint32_t base,
uint32_t count
);
| Field | Type | Description |
|---|---|---|
views |
DvzImageViews * |
the image views |
base |
uint32_t |
the mip level base |
count |
uint32_t |
the mip level count |
Declared in include/datoviz/vklite/images.h:328.
dvz_image_views_type()¶
Set the image views type.
void dvz_image_views_type(
DvzImageViews * views,
VkImageViewType type
);
| Field | Type | Description |
|---|---|---|
views |
DvzImageViews * |
the image views |
type |
VkImageViewType |
the view type |
Declared in include/datoviz/vklite/images.h:307.
dvz_images()¶
Initialize a set of GPU images.
This prepares the wrapper for configuration. Call dvz_images_create() once after setting the desired format, size, usage, and allocation policy. Recreating a live image set requires dvz_images_destroy() first.
void dvz_images(
DvzDevice * device,
DvzVma * allocator,
VkImageType type,
uint32_t count,
DvzImages * images
);
| Field | Type | Description |
|---|---|---|
device |
DvzDevice * |
logical device that owns created images; must outlive images |
allocator |
DvzVma * |
allocator used for image memory; must outlive created images |
type |
VkImageType |
the image type (1D, 2D, or 3D) |
count |
uint32_t |
the number of images |
images |
DvzImages * |
Declared in include/datoviz/vklite/images.h:113.
dvz_images_alloc_flags()¶
Set the allocator policy flags used when the images create their memory.
void dvz_images_alloc_flags(
DvzImages * img,
DvzAllocationFlags flags
);
| Field | Type | Description |
|---|---|---|
img |
DvzImages * |
initialized image wrapper |
flags |
DvzAllocationFlags |
Datoviz allocation policy flags |
Declared in include/datoviz/vklite/images.h:166.
dvz_images_count()¶
Return the number of images wrapped by an images object.
uint32_t dvz_images_count(
DvzImages * img
);
| Field | Type | Description |
|---|---|---|
| return | uint32_t |
the image count |
img |
DvzImages * |
the images |
Declared in include/datoviz/vklite/images.h:240.
dvz_images_create()¶
Create the images after they have been set up.
This function creates the wrapped Vulkan images exactly once per live wrapper. Call dvz_images_destroy() before attempting to create them again.
int dvz_images_create(
DvzImages * img
);
| Field | Type | Description |
|---|---|---|
| return | int |
0 on success, non-zero on Vulkan or Datoviz state failure |
img |
DvzImages * |
configured image wrapper |
Related: dvz_images_destroy().
Declared in include/datoviz/vklite/images.h:219.
dvz_images_create_wrapper()¶
Allocate an empty images wrapper.
Heap-allocated wrappers follow the same lifecycle as stack-owned wrappers: initialize with dvz_images(), configure, call dvz_images_create() once, then destroy before any recreate and free only if this wrapper came from dvz_images_create_wrapper().
DvzImages * dvz_images_create_wrapper(void);
| Field | Type | Description |
|---|---|---|
| return | DvzImages * |
allocated images wrapper, or NULL on allocation failure |
Declared in include/datoviz/vklite/images.h:66.
dvz_images_destroy()¶
Destroy images.
This releases Datoviz-owned Vulkan images and returns the wrapper to a reusable initialized
state. Images installed with dvz_images_wrap() are borrowed and are not destroyed.
void dvz_images_destroy(
DvzImages * img
);
| Field | Type | Description |
|---|---|---|
img |
DvzImages * |
live image wrapper; borrowed wrapped handles are retained |
Related: dvz_images_create().
Declared in include/datoviz/vklite/images.h:262.
dvz_images_flags()¶
Set the image creation flags.
void dvz_images_flags(
DvzImages * img,
VkImageCreateFlags flags
);
| Field | Type | Description |
|---|---|---|
img |
DvzImages * |
initialized image wrapper |
flags |
VkImageCreateFlags |
Vulkan image-creation flags |
Declared in include/datoviz/vklite/images.h:176.
dvz_images_format()¶
Set the images format.
void dvz_images_format(
DvzImages * img,
VkFormat format
);
| Field | Type | Description |
|---|---|---|
img |
DvzImages * |
initialized image wrapper |
format |
VkFormat |
the image format |
Declared in include/datoviz/vklite/images.h:124.
dvz_images_format_value()¶
Return the configured image format for an images object.
VkFormat dvz_images_format_value(
DvzImages * img
);
| Field | Type | Description |
|---|---|---|
| return | VkFormat |
the Vulkan image format |
img |
DvzImages * |
the images |
Declared in include/datoviz/vklite/images.h:250.
dvz_images_free()¶
Free an images wrapper allocated by dvz_images_create_wrapper().
void dvz_images_free(
DvzImages * img
);
| Field | Type | Description |
|---|---|---|
img |
DvzImages * |
images wrapper to free |
Declared in include/datoviz/vklite/images.h:75.
dvz_images_layers()¶
Set the number of array layers.
void dvz_images_layers(
DvzImages * img,
uint32_t layers
);
| Field | Type | Description |
|---|---|---|
img |
DvzImages * |
initialized image wrapper |
layers |
uint32_t |
the number of array layers |
Declared in include/datoviz/vklite/images.h:206.
dvz_images_mip()¶
Set the number of mip levels.
void dvz_images_mip(
DvzImages * img,
uint32_t mip
);
| Field | Type | Description |
|---|---|---|
img |
DvzImages * |
initialized image wrapper |
mip |
uint32_t |
the number of mip levels |
Declared in include/datoviz/vklite/images.h:186.
dvz_images_samples()¶
Set the number of MSAA samples.
void dvz_images_samples(
DvzImages * img,
VkSampleCountFlags samples
);
| Field | Type | Description |
|---|---|---|
img |
DvzImages * |
initialized image wrapper |
samples |
VkSampleCountFlags |
the Vulkan samples flags |
Declared in include/datoviz/vklite/images.h:196.
dvz_images_size()¶
Set the images shape.
void dvz_images_size(
DvzImages * img,
uint32_t width,
uint32_t height,
uint32_t depth
);
| Field | Type | Description |
|---|---|---|
img |
DvzImages * |
initialized image wrapper |
width |
uint32_t |
the image width, in pixels |
height |
uint32_t |
the image height, in pixels |
depth |
uint32_t |
the image depth, in pixels |
Declared in include/datoviz/vklite/images.h:136.
dvz_images_tiling()¶
Set the images tiling.
void dvz_images_tiling(
DvzImages * img,
VkImageTiling tiling
);
| Field | Type | Description |
|---|---|---|
img |
DvzImages * |
initialized image wrapper |
tiling |
VkImageTiling |
the image tiling |
Declared in include/datoviz/vklite/images.h:146.
dvz_images_usage()¶
Set the images usage.
void dvz_images_usage(
DvzImages * img,
VkImageUsageFlags usage
);
| Field | Type | Description |
|---|---|---|
img |
DvzImages * |
initialized image wrapper |
usage |
VkImageUsageFlags |
the image usage |
Declared in include/datoviz/vklite/images.h:156.
dvz_images_wrap()¶
Wrap an existing Vulkan image into a DvzImages struct.
The Vulkan image remains externally owned. Datoviz records the handle for view creation, transitions, and descriptor binding according to later calls, but does not destroy the image.
void dvz_images_wrap(
DvzDevice * device,
DvzVma * allocator,
VkImageType type,
VkImage vk_image,
DvzImages * img
);
| Field | Type | Description |
|---|---|---|
device |
DvzDevice * |
logical device associated with vk_image; must outlive img |
allocator |
DvzVma * |
allocator associated with the image, or NULL when not needed |
type |
VkImageType |
the image type (1D, 2D, or 3D) |
vk_image |
VkImage |
externally owned live Vulkan image handle |
img |
DvzImages * |
Declared in include/datoviz/vklite/images.h:278.
dvz_sampler()¶
Initialize a texture sampler.
This prepares the wrapper for configuration. Call dvz_sampler_create() once after setting filter and address-mode state. Recreating a live sampler requires dvz_sampler_destroy() first.
void dvz_sampler(
DvzDevice * device,
DvzSampler * sampler
);
| Field | Type | Description |
|---|---|---|
device |
DvzDevice * |
the device |
sampler |
DvzSampler * |
the sampler object to create |
Declared in include/datoviz/vklite/sampler.h:82.
dvz_sampler_address_mode()¶
Set the sampler address mode
void dvz_sampler_address_mode(
DvzSampler * sampler,
DvzSamplerAxis axis,
VkSamplerAddressMode address_mode
);
| Field | Type | Description |
|---|---|---|
sampler |
DvzSampler * |
the sampler |
axis |
DvzSamplerAxis |
the sampler axis |
address_mode |
VkSamplerAddressMode |
the address mode |
Declared in include/datoviz/vklite/sampler.h:113.
dvz_sampler_anisotropy()¶
Set the anisotropy.
void dvz_sampler_anisotropy(
DvzSampler * sampler,
float anisotropy
);
| Field | Type | Description |
|---|---|---|
sampler |
DvzSampler * |
the sampler |
anisotropy |
float |
anisotropy |
Declared in include/datoviz/vklite/sampler.h:124.
dvz_sampler_create()¶
Create the sampler after it has been set up.
This function creates the wrapped Vulkan sampler exactly once per live wrapper. Call dvz_sampler_destroy() before attempting to create it again.
int dvz_sampler_create(
DvzSampler * sampler
);
| Field | Type | Description |
|---|---|---|
| return | int |
the creation result code |
sampler |
DvzSampler * |
the sampler |
Related: dvz_sampler_destroy().
Declared in include/datoviz/vklite/sampler.h:137.
dvz_sampler_create_wrapper()¶
Allocate an empty sampler wrapper.
Heap-allocated wrappers follow the same lifecycle as stack-owned wrappers: initialize with dvz_sampler(), configure, call dvz_sampler_create() once, then destroy before any recreate and free only if this wrapper came from dvz_sampler_create_wrapper().
DvzSampler * dvz_sampler_create_wrapper(void);
| Field | Type | Description |
|---|---|---|
| return | DvzSampler * |
allocated sampler wrapper, or NULL on allocation failure |
Declared in include/datoviz/vklite/sampler.h:68.
dvz_sampler_destroy()¶
Destroy a sampler.
This releases the wrapped Vulkan sampler and returns the wrapper to a reusable initialized state.
void dvz_sampler_destroy(
DvzSampler * sampler
);
| Field | Type | Description |
|---|---|---|
sampler |
DvzSampler * |
the sampler |
Related: dvz_sampler_create().
Declared in include/datoviz/vklite/sampler.h:149.
dvz_sampler_free()¶
Free a sampler wrapper allocated by dvz_sampler_create_wrapper().
void dvz_sampler_free(
DvzSampler * sampler
);
| Field | Type | Description |
|---|---|---|
sampler |
DvzSampler * |
sampler wrapper to free |
Declared in include/datoviz/vklite/sampler.h:168.
dvz_sampler_handle()¶
Return the Vulkan sampler handle.
VkSampler dvz_sampler_handle(
DvzSampler * sampler
);
| Field | Type | Description |
|---|---|---|
| return | VkSampler |
borrowed Vulkan sampler handle, or VK_NULL_HANDLE when not created |
sampler |
DvzSampler * |
sampler wrapper |
Declared in include/datoviz/vklite/sampler.h:159.
dvz_sampler_mag_filter()¶
Set the sampler mag filter.
void dvz_sampler_mag_filter(
DvzSampler * sampler,
VkFilter filter
);
| Field | Type | Description |
|---|---|---|
sampler |
DvzSampler * |
the sampler |
filter |
VkFilter |
the filter |
Declared in include/datoviz/vklite/sampler.h:102.
dvz_sampler_min_filter()¶
Set the sampler min filter.
void dvz_sampler_min_filter(
DvzSampler * sampler,
VkFilter filter
);
| Field | Type | Description |
|---|---|---|
sampler |
DvzSampler * |
the sampler |
filter |
VkFilter |
the filter |
Declared in include/datoviz/vklite/sampler.h:92.
Types
DvzBuffer · typedef
typedef struct DvzBuffer DvzBuffer;
Declared in include/datoviz/vklite/buffers.h.
DvzBufferViews · typedef
typedef struct DvzBufferViews DvzBufferViews;
Declared in include/datoviz/vklite/buffers.h:42.
DvzImageBlit · typedef
typedef struct DvzImageBlit DvzImageBlit;
Declared in include/datoviz/vklite/images.h:45.
DvzImageCopy · typedef
typedef struct DvzImageCopy DvzImageCopy;
Declared in include/datoviz/vklite/images.h:46.
DvzImageRegion · typedef
typedef struct VkBufferImageCopy2 DvzImageRegion;
Declared in include/datoviz/vklite/images.h:44.
DvzImageViews · typedef
typedef struct DvzImageViews DvzImageViews;
Declared in include/datoviz/vklite/images.h:43.
DvzImages · typedef
typedef struct DvzImages DvzImages;
Declared in include/datoviz/vklite/images.h:42.
DvzSampler · typedef
typedef struct DvzSampler DvzSampler;
Declared in include/datoviz/vklite/sampler.h:32.
DvzSamplerAxis · enum
enum DvzSamplerAxis {
DVZ_SAMPLER_AXIS_U = 0,
DVZ_SAMPLER_AXIS_V = 1,
DVZ_SAMPLER_AXIS_W = 2,
};
Declared in include/datoviz/vklite/sampler.h:41.
Synchronization And Submission¶
Functions
dvz_barrier_buffer_access()¶
Set the barrier access.
void dvz_barrier_buffer_access(
DvzBarrierBuffer * bbuf,
VkAccessFlags2 src,
VkAccessFlags2 dst
);
| Field | Type | Description |
|---|---|---|
bbuf |
DvzBarrierBuffer * |
the buffer barrier |
src |
VkAccessFlags2 |
the source access |
dst |
VkAccessFlags2 |
the destination access |
Declared in include/datoviz/vklite/sync.h:186.
dvz_barrier_buffer_queue()¶
Set the queue family transfer.
void dvz_barrier_buffer_queue(
DvzBarrierBuffer * bbuf,
uint32_t src,
uint32_t dst
);
| Field | Type | Description |
|---|---|---|
bbuf |
DvzBarrierBuffer * |
the buffer barrier |
src |
uint32_t |
the source queue family index |
dst |
uint32_t |
the destination queue family index |
Declared in include/datoviz/vklite/sync.h:198.
dvz_barrier_buffer_stage()¶
Set the barrier stages.
void dvz_barrier_buffer_stage(
DvzBarrierBuffer * bbuf,
VkPipelineStageFlags2 src,
VkPipelineStageFlags2 dst
);
| Field | Type | Description |
|---|---|---|
bbuf |
DvzBarrierBuffer * |
the buffer barrier |
src |
VkPipelineStageFlags2 |
the source stages |
dst |
VkPipelineStageFlags2 |
the destination stages |
Declared in include/datoviz/vklite/sync.h:174.
dvz_barrier_image_access()¶
Set the barrier access.
void dvz_barrier_image_access(
DvzBarrierImage * bimg,
VkAccessFlags2 src,
VkAccessFlags2 dst
);
| Field | Type | Description |
|---|---|---|
bimg |
DvzBarrierImage * |
the image barrier |
src |
VkAccessFlags2 |
the source access |
dst |
VkAccessFlags2 |
the destination access |
Declared in include/datoviz/vklite/sync.h:226.
dvz_barrier_image_aspect()¶
Set the barrier image aspect flags.
void dvz_barrier_image_aspect(
DvzBarrierImage * bimg,
VkImageAspectFlags aspect
);
| Field | Type | Description |
|---|---|---|
bimg |
DvzBarrierImage * |
the image barrier |
aspect |
VkImageAspectFlags |
the image aspect flags |
Declared in include/datoviz/vklite/sync.h:261.
dvz_barrier_image_layers()¶
Set the array layers of an image barrier.
void dvz_barrier_image_layers(
DvzBarrierImage * bimg,
uint32_t base,
uint32_t count
);
| Field | Type | Description |
|---|---|---|
bimg |
DvzBarrierImage * |
the image barrier |
base |
uint32_t |
the base array layer index |
count |
uint32_t |
the number of array layers |
Declared in include/datoviz/vklite/sync.h:285.
dvz_barrier_image_layout()¶
Set the image layout change.
void dvz_barrier_image_layout(
DvzBarrierImage * bimg,
VkImageLayout old,
VkImageLayout new_layout
);
| Field | Type | Description |
|---|---|---|
bimg |
DvzBarrierImage * |
the image barrier |
old |
VkImageLayout |
the old image layout |
new_layout |
VkImageLayout |
the new image layout |
Declared in include/datoviz/vklite/sync.h:238.
dvz_barrier_image_mip()¶
Set the MIP images of an image barrier.
void dvz_barrier_image_mip(
DvzBarrierImage * bimg,
uint32_t base,
uint32_t count
);
| Field | Type | Description |
|---|---|---|
bimg |
DvzBarrierImage * |
the image barrier |
base |
uint32_t |
the base index |
count |
uint32_t |
the number of MIP images |
Declared in include/datoviz/vklite/sync.h:273.
dvz_barrier_image_queue()¶
Set the queue family transfer.
void dvz_barrier_image_queue(
DvzBarrierImage * bimg,
uint32_t src,
uint32_t dst
);
| Field | Type | Description |
|---|---|---|
bimg |
DvzBarrierImage * |
the image barrier |
src |
uint32_t |
the source queue family index |
dst |
uint32_t |
the destination queue family index |
Declared in include/datoviz/vklite/sync.h:250.
dvz_barrier_image_stage()¶
Set the barrier stages.
void dvz_barrier_image_stage(
DvzBarrierImage * bimg,
VkPipelineStageFlags2 src,
VkPipelineStageFlags2 dst
);
| Field | Type | Description |
|---|---|---|
bimg |
DvzBarrierImage * |
the image barrier |
src |
VkPipelineStageFlags2 |
the source stages |
dst |
VkPipelineStageFlags2 |
the destination stages |
Declared in include/datoviz/vklite/sync.h:214.
dvz_barrier_memory_access()¶
Set the barrier access.
void dvz_barrier_memory_access(
DvzBarrierMemory * bmem,
VkAccessFlags2 src,
VkAccessFlags2 dst
);
| Field | Type | Description |
|---|---|---|
bmem |
DvzBarrierMemory * |
the memory barrier |
src |
VkAccessFlags2 |
the source access |
dst |
VkAccessFlags2 |
the destination access |
Declared in include/datoviz/vklite/sync.h:159.
dvz_barrier_memory_stage()¶
Set the barrier stages.
void dvz_barrier_memory_stage(
DvzBarrierMemory * bmem,
VkPipelineStageFlags2 src,
VkPipelineStageFlags2 dst
);
| Field | Type | Description |
|---|---|---|
bmem |
DvzBarrierMemory * |
the memory barrier |
src |
VkPipelineStageFlags2 |
the source stages |
dst |
VkPipelineStageFlags2 |
the destination stages |
Declared in include/datoviz/vklite/sync.h:146.
dvz_barriers()¶
Create a set of barriers.
void dvz_barriers(
DvzBarriers * barriers
);
| Field | Type | Description |
|---|---|---|
barriers |
DvzBarriers * |
the set of barriers |
Declared in include/datoviz/vklite/sync.h:299.
dvz_barriers_buffer()¶
Add a buffer barrier to a set of barriers
Each barrier kind has capacity DVZ_MAX_BARRIERS. Returns NULL when the buffer-barrier capacity
is exhausted.
DvzBarrierBuffer * dvz_barriers_buffer(
DvzBarriers * barriers,
VkBuffer buffer,
VkDeviceSize offset,
VkDeviceSize size
);
| Field | Type | Description |
|---|---|---|
| return | DvzBarrierBuffer * |
mutable barrier owned by barriers, or NULL when capacity is exhausted |
barriers |
DvzBarriers * |
the set of barriers |
buffer |
VkBuffer |
buffer handle whose accesses are synchronized |
offset |
VkDeviceSize |
byte offset of the synchronized range within buffer |
size |
VkDeviceSize |
size of the synchronized range in bytes, or VK_WHOLE_SIZE |
Declared in include/datoviz/vklite/sync.h:338.
dvz_barriers_buffer_count()¶
Return the number of recorded buffer barriers in a barrier set.
uint32_t dvz_barriers_buffer_count(
DvzBarriers * barriers
);
| Field | Type | Description |
|---|---|---|
| return | uint32_t |
buffer-barrier count |
barriers |
DvzBarriers * |
the barrier set |
Declared in include/datoviz/vklite/sync.h:383.
dvz_barriers_capacity()¶
Return the maximum number of barriers supported per barrier type.
uint32_t dvz_barriers_capacity(
DvzBarriers * barriers
);
| Field | Type | Description |
|---|---|---|
| return | uint32_t |
barrier capacity per barrier type |
barriers |
DvzBarriers * |
the barrier set |
Declared in include/datoviz/vklite/sync.h:413.
dvz_barriers_dependency_flags()¶
Return the dependency flags configured on a barrier set.
VkDependencyFlags dvz_barriers_dependency_flags(
DvzBarriers * barriers
);
| Field | Type | Description |
|---|---|---|
| return | VkDependencyFlags |
dependency flags |
barriers |
DvzBarriers * |
the barrier set |
Declared in include/datoviz/vklite/sync.h:403.
dvz_barriers_flags()¶
Set the dependency flags of a set of barriers
void dvz_barriers_flags(
DvzBarriers * barriers,
VkDependencyFlags flags
);
| Field | Type | Description |
|---|---|---|
barriers |
DvzBarriers * |
the set of barriers |
flags |
VkDependencyFlags |
the dependency flags |
Declared in include/datoviz/vklite/sync.h:309.
dvz_barriers_image()¶
Add an image barrier to a set of barriers
Each barrier kind has capacity DVZ_MAX_BARRIERS. Returns NULL when the image-barrier capacity
is exhausted.
DvzBarrierImage * dvz_barriers_image(
DvzBarriers * barriers,
VkImage img
);
| Field | Type | Description |
|---|---|---|
| return | DvzBarrierImage * |
mutable barrier owned by barriers, or NULL when capacity is exhausted |
barriers |
DvzBarriers * |
the set of barriers |
img |
VkImage |
live image handle whose known layout and access state will be transitioned |
Declared in include/datoviz/vklite/sync.h:353.
dvz_barriers_image_count()¶
Return the number of recorded image barriers in a barrier set.
uint32_t dvz_barriers_image_count(
DvzBarriers * barriers
);
| Field | Type | Description |
|---|---|---|
| return | uint32_t |
image-barrier count |
barriers |
DvzBarriers * |
the barrier set |
Declared in include/datoviz/vklite/sync.h:393.
dvz_barriers_memory()¶
Add a memory barrier to a set of barriers
Each barrier kind has capacity DVZ_MAX_BARRIERS. Returns NULL when the memory-barrier capacity
is exhausted.
DvzBarrierMemory * dvz_barriers_memory(
DvzBarriers * barriers
);
| Field | Type | Description |
|---|---|---|
| return | DvzBarrierMemory * |
mutable barrier owned by barriers, or NULL when capacity is exhausted |
barriers |
DvzBarriers * |
the set of barriers |
Declared in include/datoviz/vklite/sync.h:322.
dvz_barriers_memory_count()¶
Return the number of recorded memory barriers in a barrier set.
uint32_t dvz_barriers_memory_count(
DvzBarriers * barriers
);
| Field | Type | Description |
|---|---|---|
| return | uint32_t |
memory-barrier count |
barriers |
DvzBarriers * |
the barrier set |
Declared in include/datoviz/vklite/sync.h:373.
dvz_fence()¶
Initialize a fence (CPU-GPU synchronization).
void dvz_fence(
DvzDevice * device,
_Bool signaled,
DvzFence * fence
);
| Field | Type | Description |
|---|---|---|
device |
DvzDevice * |
logical device that owns the fence; must outlive fence |
signaled |
_Bool |
whether the fence is created in the signaled state or not |
fence |
DvzFence * |
Declared in include/datoviz/vklite/sync.h:428.
dvz_fence_create_wrapper()¶
Allocate an empty fence wrapper.
DvzFence * dvz_fence_create_wrapper(void);
| Field | Type | Description |
|---|---|---|
| return | DvzFence * |
allocated fence wrapper, or NULL on allocation failure |
Declared in include/datoviz/vklite/sync.h:88.
dvz_fence_destroy()¶
Destroy fence.
void dvz_fence_destroy(
DvzFence * fence
);
| Field | Type | Description |
|---|---|---|
fence |
DvzFence * |
the fence |
Declared in include/datoviz/vklite/sync.h:476.
dvz_fence_free()¶
Free a fence wrapper allocated by dvz_fence_create_wrapper().
void dvz_fence_free(
DvzFence * fence
);
| Field | Type | Description |
|---|---|---|
fence |
DvzFence * |
fence wrapper to free |
Declared in include/datoviz/vklite/sync.h:97.
dvz_fence_handle()¶
Return the Vulkan fence handle owned by a fence wrapper.
VkFence dvz_fence_handle(
DvzFence * fence
);
| Field | Type | Description |
|---|---|---|
| return | VkFence |
borrowed Vulkan fence handle, or VK_NULL_HANDLE when not initialized |
fence |
DvzFence * |
the fence |
Declared in include/datoviz/vklite/sync.h:448.
dvz_fence_ready()¶
Return whether a fence is ready.
_Bool dvz_fence_ready(
DvzFence * fence
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
true if the fence is signaled, false if it is unsignaled or the query failed |
fence |
DvzFence * |
the fence |
Declared in include/datoviz/vklite/sync.h:458.
dvz_fence_reset()¶
Reset a fence to the unsignaled state.
void dvz_fence_reset(
DvzFence * fence
);
| Field | Type | Description |
|---|---|---|
fence |
DvzFence * |
the fence |
Declared in include/datoviz/vklite/sync.h:467.
dvz_fence_wait()¶
Wait on the GPU until a fence is signaled.
_Bool dvz_fence_wait(
DvzFence * fence
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the fence was signaled successfully |
fence |
DvzFence * |
the fence |
Declared in include/datoviz/vklite/sync.h:438.
dvz_semaphore()¶
Initialize a semaphore (GPU-GPU synchronization).
void dvz_semaphore(
DvzDevice * device,
DvzSemaphore * semaphore
);
| Field | Type | Description |
|---|---|---|
device |
DvzDevice * |
logical device that owns the semaphore; must outlive semaphore |
semaphore |
DvzSemaphore * |
Declared in include/datoviz/vklite/sync.h:490.
dvz_semaphore_create_wrapper()¶
Allocate an empty semaphore wrapper.
DvzSemaphore * dvz_semaphore_create_wrapper(void);
| Field | Type | Description |
|---|---|---|
| return | DvzSemaphore * |
allocated semaphore wrapper, or NULL on allocation failure |
Declared in include/datoviz/vklite/sync.h:106.
dvz_semaphore_destroy()¶
Destroy semaphore.
void dvz_semaphore_destroy(
DvzSemaphore * semaphore
);
| Field | Type | Description |
|---|---|---|
semaphore |
DvzSemaphore * |
the semaphore |
Declared in include/datoviz/vklite/sync.h:566.
dvz_semaphore_export_fd()¶
Export a semaphore as a Unix file descriptor.
int dvz_semaphore_export_fd(
DvzSemaphore * semaphore,
VkExternalSemaphoreHandleTypeFlags handle_type
);
| Field | Type | Description |
|---|---|---|
| return | int |
owned file descriptor on success, -1 on failure or unsupported platforms; the caller must close a successful descriptor |
semaphore |
DvzSemaphore * |
semaphore to export |
handle_type |
VkExternalSemaphoreHandleTypeFlags |
external handle type requested by the caller |
Declared in include/datoviz/vklite/sync.h:557.
dvz_semaphore_free()¶
Free a semaphore wrapper allocated by dvz_semaphore_create_wrapper().
void dvz_semaphore_free(
DvzSemaphore * semaphore
);
| Field | Type | Description |
|---|---|---|
semaphore |
DvzSemaphore * |
semaphore wrapper to free |
Declared in include/datoviz/vklite/sync.h:115.
dvz_semaphore_handle()¶
Return the Vulkan semaphore handle owned by a semaphore wrapper.
VkSemaphore dvz_semaphore_handle(
DvzSemaphore * semaphore
);
| Field | Type | Description |
|---|---|---|
| return | VkSemaphore |
borrowed Vulkan semaphore handle, or VK_NULL_HANDLE when not initialized |
semaphore |
DvzSemaphore * |
the semaphore |
Declared in include/datoviz/vklite/sync.h:544.
dvz_semaphore_query()¶
Retrieve the current value of a timeline semaphore.
uint64_t dvz_semaphore_query(
DvzSemaphore * semaphore
);
| Field | Type | Description |
|---|---|---|
| return | uint64_t |
current timeline value, or 0 if the query fails |
semaphore |
DvzSemaphore * |
live timeline semaphore to query |
Declared in include/datoviz/vklite/sync.h:534.
dvz_semaphore_signal()¶
Signal a timeline semaphore from the CPU.
void dvz_semaphore_signal(
DvzSemaphore * semaphore,
uint64_t value
);
| Field | Type | Description |
|---|---|---|
semaphore |
DvzSemaphore * |
live timeline semaphore to signal |
value |
uint64_t |
monotonically increasing timeline value to signal |
Declared in include/datoviz/vklite/sync.h:514.
dvz_semaphore_timeline()¶
Initialize a timeline semaphore (GPU-GPU synchronization).
void dvz_semaphore_timeline(
DvzDevice * device,
uint64_t value,
DvzSemaphore * semaphore,
VkExternalSemaphoreHandleTypeFlags handle_type
);
| Field | Type | Description |
|---|---|---|
device |
DvzDevice * |
logical device that owns the semaphore; must outlive semaphore |
value |
uint64_t |
the initial value |
semaphore |
DvzSemaphore * |
|
handle_type |
VkExternalSemaphoreHandleTypeFlags |
external semaphore handle type required for export (0 when unused) |
Declared in include/datoviz/vklite/sync.h:502.
dvz_semaphore_wait()¶
Wait a timeline semaphore on the CPU.
void dvz_semaphore_wait(
DvzSemaphore * semaphore,
uint64_t value
);
| Field | Type | Description |
|---|---|---|
semaphore |
DvzSemaphore * |
live timeline semaphore to wait on |
value |
uint64_t |
timeline value that must be reached |
Declared in include/datoviz/vklite/sync.h:524.
dvz_submit()¶
Initialize or reset a submission.
void dvz_submit(
DvzSubmit * submit
);
| Field | Type | Description |
|---|---|---|
submit |
DvzSubmit * |
the submission |
Declared in include/datoviz/vklite/sync.h:580.
dvz_submit_command()¶
Add a command buffer to the submission.
A submission stores at most DVZ_MAX_COMMANDS command buffers. Extra command buffers are ignored
after logging an error.
void dvz_submit_command(
DvzSubmit * submit,
VkCommandBuffer cmd
);
| Field | Type | Description |
|---|---|---|
submit |
DvzSubmit * |
the submission |
cmd |
VkCommandBuffer |
the command buffer |
Declared in include/datoviz/vklite/sync.h:625.
dvz_submit_command_count()¶
Return the number of command buffers configured on a submission.
uint32_t dvz_submit_command_count(
DvzSubmit * submit
);
| Field | Type | Description |
|---|---|---|
| return | uint32_t |
command-buffer count |
submit |
DvzSubmit * |
the submission |
Declared in include/datoviz/vklite/sync.h:655.
dvz_submit_create_wrapper()¶
Allocate an empty submit wrapper.
DvzSubmit * dvz_submit_create_wrapper(void);
| Field | Type | Description |
|---|---|---|
| return | DvzSubmit * |
allocated submit wrapper, or NULL on allocation failure |
Declared in include/datoviz/vklite/sync.h:124.
dvz_submit_free()¶
Free a submit wrapper allocated by dvz_submit_create_wrapper().
void dvz_submit_free(
DvzSubmit * submit
);
| Field | Type | Description |
|---|---|---|
submit |
DvzSubmit * |
submit wrapper to free |
Declared in include/datoviz/vklite/sync.h:133.
dvz_submit_is_empty()¶
Return whether a submission has no recorded waits, signals, or command buffers.
_Bool dvz_submit_is_empty(
DvzSubmit * submit
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
true when the submission is empty |
submit |
DvzSubmit * |
the submission |
Declared in include/datoviz/vklite/sync.h:665.
dvz_submit_send()¶
Send a submission to a queue.
int32_t dvz_submit_send(
DvzSubmit * submit,
VkQueue queue,
VkFence fence
);
| Field | Type | Description |
|---|---|---|
| return | int32_t |
Vulkan result code cast to int32_t (VK_SUCCESS on success) |
submit |
DvzSubmit * |
the submission |
queue |
VkQueue |
borrowed Vulkan queue on which to submit |
fence |
VkFence |
optional borrowed fence signaled after completion, or VK_NULL_HANDLE |
Declared in include/datoviz/vklite/sync.h:677.
dvz_submit_signal()¶
Add a semaphore to signal.
A submission stores at most DVZ_MAX_SEMAPHORES signal semaphores. Extra signals are ignored
after logging an error.
void dvz_submit_signal(
DvzSubmit * submit,
VkSemaphore semaphore,
uint64_t value,
VkPipelineStageFlags2 stage
);
| Field | Type | Description |
|---|---|---|
submit |
DvzSubmit * |
the submission |
semaphore |
VkSemaphore |
the semaphore |
value |
uint64_t |
the value to signal, if using a timeline semaphore |
stage |
VkPipelineStageFlags2 |
pipeline stage mask associated with the signal operation |
Declared in include/datoviz/vklite/sync.h:611.
dvz_submit_signal_count()¶
Return the number of signal semaphores configured on a submission.
uint32_t dvz_submit_signal_count(
DvzSubmit * submit
);
| Field | Type | Description |
|---|---|---|
| return | uint32_t |
signal-semaphore count |
submit |
DvzSubmit * |
the submission |
Declared in include/datoviz/vklite/sync.h:645.
dvz_submit_wait()¶
Add a semaphore to wait on.
A submission stores at most DVZ_MAX_SEMAPHORES wait semaphores. Extra waits are ignored after
logging an error.
void dvz_submit_wait(
DvzSubmit * submit,
VkSemaphore semaphore,
uint64_t value,
VkPipelineStageFlags2 stage
);
| Field | Type | Description |
|---|---|---|
submit |
DvzSubmit * |
the submission |
semaphore |
VkSemaphore |
the semaphore |
value |
uint64_t |
the value to wait on, if using a timeline semaphore |
stage |
VkPipelineStageFlags2 |
destination pipeline stage mask that waits for the semaphore |
Declared in include/datoviz/vklite/sync.h:595.
dvz_submit_wait_count()¶
Return the number of wait semaphores configured on a submission.
uint32_t dvz_submit_wait_count(
DvzSubmit * submit
);
| Field | Type | Description |
|---|---|---|
| return | uint32_t |
wait-semaphore count |
submit |
DvzSubmit * |
the submission |
Declared in include/datoviz/vklite/sync.h:635.
Types
DvzBarrierBuffer · typedef
typedef struct VkBufferMemoryBarrier2 DvzBarrierBuffer;
Declared in include/datoviz/vklite/sync.h:37.
DvzBarrierImage · typedef
typedef struct VkImageMemoryBarrier2 DvzBarrierImage;
Declared in include/datoviz/vklite/sync.h:38.
DvzBarrierMemory · typedef
typedef struct VkMemoryBarrier2 DvzBarrierMemory;
Declared in include/datoviz/vklite/sync.h:36.
DvzBarriers · record
struct DvzBarriers {
VkDependencyInfo info;
DvzBarrierMemory[4] bmems;
DvzBarrierBuffer[4] bbufs;
DvzBarrierImage[4] bimg;
};
Declared in include/datoviz/vklite/sync.h:67.
DvzFence · typedef
typedef struct DvzFence DvzFence;
Declared in include/datoviz/vklite/sync.h:40.
DvzSemaphore · typedef
typedef struct DvzSemaphore DvzSemaphore;
Declared in include/datoviz/vklite/sync.h.
DvzSubmit · typedef
typedef struct DvzSubmit DvzSubmit;
Declared in include/datoviz/vklite/sync.h:42.