DRP2 API¶
Datoviz Rendering Protocol command streams, packets, recording, and runtime integration.
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 page for advanced command-stream and packet work. Ordinary scene code should start from the Scene API.
Common workflows:
Functions: 133 Types: 42
Symbol Groups¶
| Group | Functions | Types | Headers |
|---|---|---|---|
| Command Streams | 102 | 30 | 5 headers |
| Packets | 5 | 2 | include/datoviz/drp2/packet.h |
| Recording And Replay | 15 | 4 | include/datoviz/drp2/recording.h |
| Runtime Integration | 11 | 6 | 3 headers |
Grouped function index
Command Streams
Packets
| Function | Header |
|---|---|
dvz_drp2_packet_command_kind() |
include/datoviz/drp2/packet.h |
dvz_drp2_packet_decode_stream() |
include/datoviz/drp2/packet.h |
dvz_drp2_packet_destroy() |
include/datoviz/drp2/packet.h |
dvz_drp2_packet_encode_stream() |
include/datoviz/drp2/packet.h |
dvz_drp2_packet_encode_stream_phase() |
include/datoviz/drp2/packet.h |
Recording And Replay
| Function | Header |
|---|---|
dvz_drp2_recorder_close() |
include/datoviz/drp2/recording.h |
dvz_drp2_recorder_open() |
include/datoviz/drp2/recording.h |
dvz_drp2_recorder_write_stream() |
include/datoviz/drp2/recording.h |
dvz_drp2_recording_close() |
include/datoviz/drp2/recording.h |
dvz_drp2_recording_execute_all() |
include/datoviz/drp2/recording.h |
dvz_drp2_recording_execute_frame() |
include/datoviz/drp2/recording.h |
dvz_drp2_recording_frame() |
include/datoviz/drp2/recording.h |
dvz_drp2_recording_frame_count() |
include/datoviz/drp2/recording.h |
dvz_drp2_recording_frame_stream() |
include/datoviz/drp2/recording.h |
dvz_drp2_recording_info() |
include/datoviz/drp2/recording.h |
dvz_drp2_recording_open() |
include/datoviz/drp2/recording.h |
dvz_drp2_recording_playback() |
include/datoviz/drp2/recording.h |
dvz_drp2_recording_read_stream() |
include/datoviz/drp2/recording.h |
dvz_drp2_recording_stream() |
include/datoviz/drp2/recording.h |
dvz_drp2_recording_write_stream() |
include/datoviz/drp2/recording.h |
Runtime Integration
| Function | Header |
|---|---|
dvz_drp2_external_buffer_desc() |
include/datoviz/drp2/runtime.h |
dvz_drp2_runtime_attach_frame_target() |
include/datoviz/drp2/runtime.h |
dvz_drp2_runtime_copy_texture_to_frame() |
include/datoviz/drp2/runtime.h |
dvz_drp2_runtime_destroy() |
include/datoviz/drp2/runtime.h |
dvz_drp2_runtime_download_buffer() |
include/datoviz/drp2/runtime.h |
dvz_drp2_runtime_execute() |
include/datoviz/drp2/runtime.h |
dvz_drp2_runtime_get_config() |
include/datoviz/drp2/runtime.h |
dvz_drp2_runtime_register_external_buffer() |
include/datoviz/drp2/runtime.h |
dvz_drp2_runtime_reset() |
include/datoviz/drp2/runtime.h |
dvz_drp2_runtime_vklite() |
include/datoviz/drp2/runtime.h |
dvz_drp2_runtime_vklite_config() |
include/datoviz/drp2/runtime.h |
Command Streams¶
Functions
dvz_drp2_command_type()¶
Return a command type.
DvzDrp2CommandType dvz_drp2_command_type(
const DvzDrp2Command * command
);
| Field | Type | Description |
|---|---|---|
| return | DvzDrp2CommandType |
the command type |
command |
const DvzDrp2Command * |
the command |
Declared in include/datoviz/drp2/stream.h:120.
dvz_drp2_render_pass_desc()¶
Return the default BeginRenderPass descriptor.
The descriptor starts with one color attachment slot available to fill. Rectangle fields use framebuffer pixels. A zero width or height for render area, viewport, or scissor means "use the full first color attachment" at execution time.
DvzDrp2RenderPassDesc dvz_drp2_render_pass_desc(void);
| Field | Type | Description |
|---|---|---|
| return | DvzDrp2RenderPassDesc |
initialized descriptor |
Declared in include/datoviz/drp2/stream.h:907.
dvz_drp2_render_pipeline_desc()¶
Return the default CreateRenderPipeline descriptor.
DvzDrp2RenderPipelineDesc dvz_drp2_render_pipeline_desc(void);
| Field | Type | Description |
|---|---|---|
| return | DvzDrp2RenderPipelineDesc |
initialized descriptor |
Declared in include/datoviz/drp2/stream.h:358.
dvz_drp2_stream()¶
Create an empty DRP2 command stream.
DvzDrp2CommandStream * dvz_drp2_stream(void);
| Field | Type | Description |
|---|---|---|
| return | DvzDrp2CommandStream * |
the command stream |
Declared in include/datoviz/drp2/stream.h:40.
dvz_drp2_stream_begin_command_encoder()¶
Append a BeginCommandEncoder command.
_Bool dvz_drp2_stream_begin_command_encoder(
DvzDrp2CommandStream * stream,
uint64_t id
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the command was appended |
stream |
DvzDrp2CommandStream * |
the command stream |
id |
uint64_t |
the encoder id |
Declared in include/datoviz/drp2/stream.h:895.
dvz_drp2_stream_begin_compute_pass()¶
Append a BeginComputePass command.
_Bool dvz_drp2_stream_begin_compute_pass(
DvzDrp2CommandStream * stream,
uint64_t id,
uint64_t encoder_id
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the command was appended |
stream |
DvzDrp2CommandStream * |
the command stream |
id |
uint64_t |
the compute pass id |
encoder_id |
uint64_t |
the encoder id |
Declared in include/datoviz/drp2/stream.h:1098.
dvz_drp2_stream_begin_render_pass()¶
Append a BeginRenderPass command with one color texture attachment.
_Bool dvz_drp2_stream_begin_render_pass(
DvzDrp2CommandStream * stream,
uint64_t id,
uint64_t encoder_id,
uint64_t texture_id
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the command was appended |
stream |
DvzDrp2CommandStream * |
the command stream |
id |
uint64_t |
the render pass id |
encoder_id |
uint64_t |
the encoder id |
texture_id |
uint64_t |
the color attachment texture id |
Declared in include/datoviz/drp2/stream.h:931.
dvz_drp2_stream_begin_render_pass_add_color_attachment()¶
Add a color attachment to the most recently appended BeginRenderPass command.
_Bool dvz_drp2_stream_begin_render_pass_add_color_attachment(
DvzDrp2CommandStream * stream,
uint64_t texture_id,
float r,
float g,
float b,
float a,
_Bool clear
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the most recent command was a BeginRenderPass and was updated |
stream |
DvzDrp2CommandStream * |
the command stream |
texture_id |
uint64_t |
the color attachment texture id |
r |
float |
clear color red channel |
g |
float |
clear color green channel |
b |
float |
clear color blue channel |
a |
float |
clear color alpha channel |
clear |
_Bool |
whether to clear this attachment at render-pass begin |
Declared in include/datoviz/drp2/stream.h:994.
dvz_drp2_stream_begin_render_pass_clear()¶
Append a BeginRenderPass command with an explicit RGBA clear color.
_Bool dvz_drp2_stream_begin_render_pass_clear(
DvzDrp2CommandStream * stream,
uint64_t id,
uint64_t encoder_id,
uint64_t texture_id,
float r,
float g,
float b,
float a
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the command was appended |
stream |
DvzDrp2CommandStream * |
the command stream |
id |
uint64_t |
the render pass id |
encoder_id |
uint64_t |
the encoder id |
texture_id |
uint64_t |
the color attachment texture id |
r |
float |
red clear value [0, 1] |
g |
float |
green clear value [0, 1] |
b |
float |
blue clear value [0, 1] |
a |
float |
alpha clear value [0, 1] |
Declared in include/datoviz/drp2/stream.h:949.
dvz_drp2_stream_begin_render_pass_desc()¶
Append a BeginRenderPass command from an explicit descriptor.
_Bool dvz_drp2_stream_begin_render_pass_desc(
DvzDrp2CommandStream * stream,
const DvzDrp2RenderPassDesc * desc
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the command was appended |
stream |
DvzDrp2CommandStream * |
the command stream |
desc |
const DvzDrp2RenderPassDesc * |
render-pass descriptor |
Related: dvz_drp2_stream_begin_render_pass().
Declared in include/datoviz/drp2/stream.h:917.
dvz_drp2_stream_begin_render_pass_region_clear()¶
Append a BeginRenderPass command for a normalized target sub-region.
The render pass targets the rectangle (x, y, width, height) in normalized
[0, 1] attachment coordinates. When clear is true, the runtime clears the
full target before rendering; when false, existing target contents are
preserved and only subsequent draw commands are clipped to the region.
_Bool dvz_drp2_stream_begin_render_pass_region_clear(
DvzDrp2CommandStream * stream,
uint64_t id,
uint64_t encoder_id,
uint64_t texture_id,
float r,
float g,
float b,
float a,
float x,
float y,
float width,
float height,
_Bool clear
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the command was appended |
stream |
DvzDrp2CommandStream * |
the command stream |
id |
uint64_t |
the render pass id |
encoder_id |
uint64_t |
the encoder id |
texture_id |
uint64_t |
the color attachment texture id |
r |
float |
clear color red channel |
g |
float |
clear color green channel |
b |
float |
clear color blue channel |
a |
float |
clear color alpha channel |
x |
float |
normalized left coordinate in attachment space [0, 1] |
y |
float |
normalized top coordinate in attachment space [0, 1] |
width |
float |
normalized width in attachment space [0, 1] |
height |
float |
normalized height in attachment space [0, 1] |
clear |
_Bool |
whether to clear the target at render-pass begin |
Declared in include/datoviz/drp2/stream.h:977.
dvz_drp2_stream_begin_render_pass_set_color_attachment_access()¶
Set access intent on one color attachment of the most recent BeginRenderPass command.
_Bool dvz_drp2_stream_begin_render_pass_set_color_attachment_access(
DvzDrp2CommandStream * stream,
uint32_t attachment_index,
DvzDrp2AttachmentAccess access
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the most recent command was a BeginRenderPass and was updated |
stream |
DvzDrp2CommandStream * |
the command stream |
attachment_index |
uint32_t |
the color attachment index |
access |
DvzDrp2AttachmentAccess |
the attachment access intent |
Declared in include/datoviz/drp2/stream.h:1021.
dvz_drp2_stream_begin_render_pass_set_color_attachment_ops()¶
Set load/store operations on one color attachment of the most recent BeginRenderPass command.
_Bool dvz_drp2_stream_begin_render_pass_set_color_attachment_ops(
DvzDrp2CommandStream * stream,
uint32_t attachment_index,
DvzDrp2AttachmentLoadOp load_op,
DvzDrp2AttachmentStoreOp store_op
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the most recent command was a BeginRenderPass and was updated |
stream |
DvzDrp2CommandStream * |
the command stream |
attachment_index |
uint32_t |
the color attachment index |
load_op |
DvzDrp2AttachmentLoadOp |
the attachment load operation |
store_op |
DvzDrp2AttachmentStoreOp |
the attachment store operation |
Declared in include/datoviz/drp2/stream.h:1008.
dvz_drp2_stream_begin_render_pass_set_color_attachment_resolve()¶
Set the resolve target on one color attachment of the most recent BeginRenderPass command.
_Bool dvz_drp2_stream_begin_render_pass_set_color_attachment_resolve(
DvzDrp2CommandStream * stream,
uint32_t attachment_index,
uint64_t resolve_texture_id,
uint32_t resolve_mode
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the most recent command was a BeginRenderPass and was updated |
stream |
DvzDrp2CommandStream * |
the command stream |
attachment_index |
uint32_t |
the color attachment index |
resolve_texture_id |
uint64_t |
the single-sample resolve texture id, or 0 to disable resolve |
resolve_mode |
uint32_t |
backend-native resolve mode, with 0 treated as average |
Declared in include/datoviz/drp2/stream.h:1034.
dvz_drp2_stream_begin_render_pass_set_depth()¶
Attach a transient depth attachment request to the most recently appended BeginRenderPass command.
_Bool dvz_drp2_stream_begin_render_pass_set_depth(
DvzDrp2CommandStream * stream,
float clear_depth
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the most recent command was a BeginRenderPass and was updated |
stream |
DvzDrp2CommandStream * |
the command stream |
clear_depth |
float |
the depth clear value used when the pass clears attachments |
Declared in include/datoviz/drp2/stream.h:1048.
dvz_drp2_stream_begin_render_pass_set_depth_access()¶
Set access intent on the depth attachment of the most recent BeginRenderPass command.
_Bool dvz_drp2_stream_begin_render_pass_set_depth_access(
DvzDrp2CommandStream * stream,
DvzDrp2AttachmentAccess access
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the most recent command was a BeginRenderPass and was updated |
stream |
DvzDrp2CommandStream * |
the command stream |
access |
DvzDrp2AttachmentAccess |
the depth attachment access intent |
Declared in include/datoviz/drp2/stream.h:1085.
dvz_drp2_stream_begin_render_pass_set_depth_ops()¶
Set load/store operations on the depth attachment of the most recent BeginRenderPass command.
_Bool dvz_drp2_stream_begin_render_pass_set_depth_ops(
DvzDrp2CommandStream * stream,
DvzDrp2AttachmentLoadOp load_op,
DvzDrp2AttachmentStoreOp store_op
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the most recent command was a BeginRenderPass and was updated |
stream |
DvzDrp2CommandStream * |
the command stream |
load_op |
DvzDrp2AttachmentLoadOp |
the depth attachment load operation |
store_op |
DvzDrp2AttachmentStoreOp |
the depth attachment store operation |
Declared in include/datoviz/drp2/stream.h:1073.
dvz_drp2_stream_begin_render_pass_set_depth_texture()¶
Attach a named depth texture to the most recently appended BeginRenderPass command.
A zero depth_texture_id keeps the existing transient depth attachment behavior.
_Bool dvz_drp2_stream_begin_render_pass_set_depth_texture(
DvzDrp2CommandStream * stream,
uint64_t depth_texture_id,
float clear_depth
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the most recent command was a BeginRenderPass and was updated |
stream |
DvzDrp2CommandStream * |
the command stream |
depth_texture_id |
uint64_t |
the depth attachment texture id, or 0 for transient depth |
clear_depth |
float |
the depth clear value used when the pass clears attachments |
Declared in include/datoviz/drp2/stream.h:1061.
dvz_drp2_stream_copy_buffer_to_buffer()¶
Append a CopyBufferToBuffer command.
_Bool dvz_drp2_stream_copy_buffer_to_buffer(
DvzDrp2CommandStream * stream,
uint64_t encoder_id,
uint64_t src_buffer_id,
uint64_t src_offset,
uint64_t dst_buffer_id,
uint64_t dst_offset,
uint64_t size
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the command was appended |
stream |
DvzDrp2CommandStream * |
the command stream |
encoder_id |
uint64_t |
the encoder id |
src_buffer_id |
uint64_t |
the source buffer id |
src_offset |
uint64_t |
the source byte offset |
dst_buffer_id |
uint64_t |
the destination buffer id |
dst_offset |
uint64_t |
the destination byte offset |
size |
uint64_t |
the copied byte size |
Declared in include/datoviz/drp2/stream.h:1317.
dvz_drp2_stream_copy_buffer_to_texture()¶
Append a CopyBufferToTexture command.
_Bool dvz_drp2_stream_copy_buffer_to_texture(
DvzDrp2CommandStream * stream,
uint64_t encoder_id,
uint64_t src_buffer_id,
uint64_t src_offset,
uint64_t dst_texture_id,
uint32_t width,
uint32_t height,
uint32_t bytes_per_row,
uint32_t rows_per_image
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the command was appended |
stream |
DvzDrp2CommandStream * |
the command stream |
encoder_id |
uint64_t |
the encoder id |
src_buffer_id |
uint64_t |
the source buffer id |
src_offset |
uint64_t |
the source byte offset |
dst_texture_id |
uint64_t |
the destination texture id |
width |
uint32_t |
the copy width in pixels |
height |
uint32_t |
the copy height in pixels |
bytes_per_row |
uint32_t |
the source bytes per row |
rows_per_image |
uint32_t |
the source rows per image |
Declared in include/datoviz/drp2/stream.h:1337.
dvz_drp2_stream_copy_texture_to_buffer()¶
Append a CopyTextureToBuffer command.
_Bool dvz_drp2_stream_copy_texture_to_buffer(
DvzDrp2CommandStream * stream,
uint64_t encoder_id,
uint64_t src_texture_id,
uint64_t dst_buffer_id,
uint64_t dst_offset,
uint32_t width,
uint32_t height,
uint32_t bytes_per_row,
uint32_t rows_per_image
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the command was appended |
stream |
DvzDrp2CommandStream * |
the command stream |
encoder_id |
uint64_t |
the encoder id |
src_texture_id |
uint64_t |
the source texture id |
dst_buffer_id |
uint64_t |
the destination buffer id |
dst_offset |
uint64_t |
the destination byte offset |
width |
uint32_t |
the copy width in pixels |
height |
uint32_t |
the copy height in pixels |
bytes_per_row |
uint32_t |
the destination bytes per row |
rows_per_image |
uint32_t |
the destination rows per image |
Declared in include/datoviz/drp2/stream.h:1358.
dvz_drp2_stream_copy_texture_to_texture()¶
Append a CopyTextureToTexture command.
_Bool dvz_drp2_stream_copy_texture_to_texture(
DvzDrp2CommandStream * stream,
uint64_t encoder_id,
uint64_t src_texture_id,
uint64_t dst_texture_id,
uint32_t width,
uint32_t height
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the command was appended |
stream |
DvzDrp2CommandStream * |
the command stream |
encoder_id |
uint64_t |
the encoder id |
src_texture_id |
uint64_t |
the source texture id |
dst_texture_id |
uint64_t |
the destination texture id |
width |
uint32_t |
the copy width in pixels |
height |
uint32_t |
the copy height in pixels |
Declared in include/datoviz/drp2/stream.h:1376.
dvz_drp2_stream_count()¶
Return the number of commands in a DRP2 command stream.
uint32_t dvz_drp2_stream_count(
const DvzDrp2CommandStream * stream
);
| Field | Type | Description |
|---|---|---|
| return | uint32_t |
the number of commands |
stream |
const DvzDrp2CommandStream * |
the command stream |
Declared in include/datoviz/drp2/stream.h:59.
dvz_drp2_stream_create_bind_group_entries()¶
Append a CreateBindGroup command with explicit resource entries.
entry_count must be in [1, DVZ_DRP2_MAX_BINDINGS] and entries must not be NULL. Invalid
inputs are rejected and no command is appended.
_Bool dvz_drp2_stream_create_bind_group_entries(
DvzDrp2CommandStream * stream,
uint64_t id,
uint64_t bind_group_layout_id,
uint32_t entry_count,
const DvzDrp2BindGroupEntry * entries
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the command was appended |
stream |
DvzDrp2CommandStream * |
the command stream |
id |
uint64_t |
the bind-group id |
bind_group_layout_id |
uint64_t |
the bind-group layout id |
entry_count |
uint32_t |
number of entries |
entries |
const DvzDrp2BindGroupEntry * |
bind-group resource entries |
Declared in include/datoviz/drp2/stream.h:680.
dvz_drp2_stream_create_bind_group_layout_entries()¶
Append a CreateBindGroupLayout command with explicit entries.
entry_count must be in [1, DVZ_DRP2_MAX_BINDINGS] and entries must not be NULL. Invalid
inputs are rejected and no command is appended.
_Bool dvz_drp2_stream_create_bind_group_layout_entries(
DvzDrp2CommandStream * stream,
uint64_t id,
uint32_t entry_count,
const DvzDrp2BindGroupLayoutEntry * entries
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the command was appended |
stream |
DvzDrp2CommandStream * |
the command stream |
id |
uint64_t |
the bind-group layout id |
entry_count |
uint32_t |
number of entries |
entries |
const DvzDrp2BindGroupLayoutEntry * |
bind-group layout entries |
Declared in include/datoviz/drp2/stream.h:612.
dvz_drp2_stream_create_buffer()¶
Append a CreateBuffer command.
_Bool dvz_drp2_stream_create_buffer(
DvzDrp2CommandStream * stream,
uint64_t id,
uint64_t size,
uint32_t usage
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the command was appended |
stream |
DvzDrp2CommandStream * |
the command stream |
id |
uint64_t |
the buffer id |
size |
uint64_t |
the buffer size in bytes |
usage |
uint32_t |
buffer usage flags |
Declared in include/datoviz/drp2/stream.h:157.
dvz_drp2_stream_create_compute_pipeline()¶
Append a CreateComputePipeline command.
_Bool dvz_drp2_stream_create_compute_pipeline(
DvzDrp2CommandStream * stream,
uint64_t id,
uint64_t compute_shader_module_id
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the command was appended |
stream |
DvzDrp2CommandStream * |
the command stream |
id |
uint64_t |
the pipeline id |
compute_shader_module_id |
uint64_t |
the compute shader module id |
Declared in include/datoviz/drp2/stream.h:508.
dvz_drp2_stream_create_compute_pipeline_with_bind_group_layout()¶
Append a CreateComputePipeline command with one bind-group layout.
_Bool dvz_drp2_stream_create_compute_pipeline_with_bind_group_layout(
DvzDrp2CommandStream * stream,
uint64_t id,
uint64_t compute_shader_module_id,
uint64_t bind_group_layout_id
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the command was appended |
stream |
DvzDrp2CommandStream * |
the command stream |
id |
uint64_t |
the pipeline id |
compute_shader_module_id |
uint64_t |
the compute shader module id |
bind_group_layout_id |
uint64_t |
the bind-group layout id for slot 0 |
Declared in include/datoviz/drp2/stream.h:522.
dvz_drp2_stream_create_render_pipeline()¶
Append a CreateRenderPipeline command from a descriptor.
binding_count and attr_count must be at most DVZ_DRP2_MAX_BINDINGS. Count-zero pointer
arrays may be NULL; non-zero counts require all matching arrays except binding_step_modes,
which may be NULL to select per-vertex stepping. bind_group_layout_count must be at most
DVZ_DRP2_MAX_BIND_GROUPS. Oversized or missing arrays are rejected and no command is appended.
_Bool dvz_drp2_stream_create_render_pipeline(
DvzDrp2CommandStream * stream,
const DvzDrp2RenderPipelineDesc * desc
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the command was appended |
stream |
DvzDrp2CommandStream * |
the command stream |
desc |
const DvzDrp2RenderPipelineDesc * |
the render-pipeline descriptor |
Declared in include/datoviz/drp2/stream.h:374.
dvz_drp2_stream_create_sampler()¶
Append a CreateSampler command.
_Bool dvz_drp2_stream_create_sampler(
DvzDrp2CommandStream * stream,
uint64_t id
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the command was appended |
stream |
DvzDrp2CommandStream * |
the command stream |
id |
uint64_t |
the sampler id |
Declared in include/datoviz/drp2/stream.h:547.
dvz_drp2_stream_create_sampler_filter()¶
Append a CreateSampler command with explicit min/mag filters.
_Bool dvz_drp2_stream_create_sampler_filter(
DvzDrp2CommandStream * stream,
uint64_t id,
DvzDrp2FilterMode mag_filter,
DvzDrp2FilterMode min_filter
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the command was appended |
stream |
DvzDrp2CommandStream * |
the command stream |
id |
uint64_t |
the sampler id |
mag_filter |
DvzDrp2FilterMode |
magnification filter |
min_filter |
DvzDrp2FilterMode |
minification filter |
Declared in include/datoviz/drp2/stream.h:559.
dvz_drp2_stream_create_shader_module()¶
Append a CreateShaderModule command.
_Bool dvz_drp2_stream_create_shader_module(
DvzDrp2CommandStream * stream,
uint64_t id,
const char * stage,
const char * code
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the command was appended |
stream |
DvzDrp2CommandStream * |
the command stream |
id |
uint64_t |
the shader module id |
stage |
const char * |
the shader stage |
code |
const char * |
the WGSL shader source |
Declared in include/datoviz/drp2/stream.h:288.
dvz_drp2_stream_create_shader_module_format()¶
Append a CreateShaderModule command with an explicit shader source format.
_Bool dvz_drp2_stream_create_shader_module_format(
DvzDrp2CommandStream * stream,
uint64_t id,
const char * stage,
const char * format,
const char * code
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the command was appended |
stream |
DvzDrp2CommandStream * |
the command stream |
id |
uint64_t |
the shader module id |
stage |
const char * |
the shader stage |
format |
const char * |
the shader source format |
code |
const char * |
the shader source |
Declared in include/datoviz/drp2/stream.h:302.
dvz_drp2_stream_create_shader_module_spirv()¶
Append a CreateShaderModule command from a precompiled SPIR-V binary (in-process path).
The caller retains ownership of spirv; it must remain valid until the stream is executed.
_Bool dvz_drp2_stream_create_shader_module_spirv(
DvzDrp2CommandStream * stream,
uint64_t id,
const char * stage,
const unsigned char * spirv,
uint64_t spirv_size
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the command was appended |
stream |
DvzDrp2CommandStream * |
the command stream |
id |
uint64_t |
the shader module id |
stage |
const char * |
the shader stage ("VERTEX", "FRAGMENT", or "COMPUTE") |
spirv |
const unsigned char * |
pointer to SPIR-V bytecode |
spirv_size |
uint64_t |
size in bytes |
Declared in include/datoviz/drp2/stream.h:320.
dvz_drp2_stream_create_storage_bind_group()¶
Append a CreateBindGroup command for two storage buffers.
_Bool dvz_drp2_stream_create_storage_bind_group(
DvzDrp2CommandStream * stream,
uint64_t id,
uint64_t bind_group_layout_id,
uint64_t buffer0_id,
uint64_t buffer1_id,
uint64_t buffer_size
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the command was appended |
stream |
DvzDrp2CommandStream * |
the command stream |
id |
uint64_t |
the bind-group id |
bind_group_layout_id |
uint64_t |
the bind-group layout id |
buffer0_id |
uint64_t |
the first storage buffer id |
buffer1_id |
uint64_t |
the second storage buffer id |
buffer_size |
uint64_t |
the bound range size for each buffer |
Declared in include/datoviz/drp2/stream.h:645.
dvz_drp2_stream_create_storage_bind_group_layout()¶
Append a CreateBindGroupLayout command for compute input/output storage buffers.
_Bool dvz_drp2_stream_create_storage_bind_group_layout(
DvzDrp2CommandStream * stream,
uint64_t id
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the command was appended |
stream |
DvzDrp2CommandStream * |
the command stream |
id |
uint64_t |
the bind-group layout id |
Declared in include/datoviz/drp2/stream.h:585.
dvz_drp2_stream_create_texture()¶
Append a CreateTexture command from a descriptor.
_Bool dvz_drp2_stream_create_texture(
DvzDrp2CommandStream * stream,
const DvzDrp2TextureDesc * desc
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the command was appended |
stream |
DvzDrp2CommandStream * |
the command stream |
desc |
const DvzDrp2TextureDesc * |
the texture descriptor |
Declared in include/datoviz/drp2/stream.h:189.
dvz_drp2_stream_create_texture_2d()¶
Append a CreateTexture command for a 2D render attachment.
_Bool dvz_drp2_stream_create_texture_2d(
DvzDrp2CommandStream * stream,
uint64_t id,
uint32_t width,
uint32_t height
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the command was appended |
stream |
DvzDrp2CommandStream * |
the command stream |
id |
uint64_t |
the texture id |
width |
uint32_t |
the texture width |
height |
uint32_t |
the texture height |
Declared in include/datoviz/drp2/stream.h:201.
dvz_drp2_stream_create_texture_2d_format_usage()¶
Append a CreateTexture command for a 2D texture with explicit format and usage.
_Bool dvz_drp2_stream_create_texture_2d_format_usage(
DvzDrp2CommandStream * stream,
uint64_t id,
uint32_t width,
uint32_t height,
DvzFormat format,
uint32_t usage
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the command was appended |
stream |
DvzDrp2CommandStream * |
the command stream |
id |
uint64_t |
the texture id |
width |
uint32_t |
the texture width |
height |
uint32_t |
the texture height |
format |
DvzFormat |
texture format token |
usage |
uint32_t |
texture usage flags |
Declared in include/datoviz/drp2/stream.h:232.
dvz_drp2_stream_create_texture_2d_usage()¶
Append a CreateTexture command for a 2D texture with explicit usage.
_Bool dvz_drp2_stream_create_texture_2d_usage(
DvzDrp2CommandStream * stream,
uint64_t id,
uint32_t width,
uint32_t height,
uint32_t usage
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the command was appended |
stream |
DvzDrp2CommandStream * |
the command stream |
id |
uint64_t |
the texture id |
width |
uint32_t |
the texture width |
height |
uint32_t |
the texture height |
usage |
uint32_t |
texture usage flags |
Declared in include/datoviz/drp2/stream.h:216.
dvz_drp2_stream_create_texture_3d()¶
Append a CreateTexture command for a 3D texture.
_Bool dvz_drp2_stream_create_texture_3d(
DvzDrp2CommandStream * stream,
uint64_t id,
uint32_t width,
uint32_t height,
uint32_t depth
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the command was appended |
stream |
DvzDrp2CommandStream * |
the command stream |
id |
uint64_t |
the texture id |
width |
uint32_t |
the texture width |
height |
uint32_t |
the texture height |
depth |
uint32_t |
the texture depth (number of slices) |
Declared in include/datoviz/drp2/stream.h:247.
dvz_drp2_stream_create_texture_3d_format_usage()¶
Append a CreateTexture command for a 3D texture with explicit format and usage.
_Bool dvz_drp2_stream_create_texture_3d_format_usage(
DvzDrp2CommandStream * stream,
uint64_t id,
uint32_t width,
uint32_t height,
uint32_t depth,
DvzFormat format,
uint32_t usage
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the command was appended |
stream |
DvzDrp2CommandStream * |
the command stream |
id |
uint64_t |
the texture id |
width |
uint32_t |
the texture width |
height |
uint32_t |
the texture height |
depth |
uint32_t |
the texture depth (number of slices) |
format |
DvzFormat |
texture format token |
usage |
uint32_t |
texture usage flags |
Declared in include/datoviz/drp2/stream.h:263.
dvz_drp2_stream_create_texture_sampler_bind_group()¶
Append a CreateBindGroup command for one sampled texture and one sampler.
_Bool dvz_drp2_stream_create_texture_sampler_bind_group(
DvzDrp2CommandStream * stream,
uint64_t id,
uint64_t bind_group_layout_id,
uint64_t texture_id,
uint64_t sampler_id
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the command was appended |
stream |
DvzDrp2CommandStream * |
the command stream |
id |
uint64_t |
the bind-group id |
bind_group_layout_id |
uint64_t |
the bind-group layout id |
texture_id |
uint64_t |
the sampled texture id |
sampler_id |
uint64_t |
the sampler id |
Declared in include/datoviz/drp2/stream.h:628.
dvz_drp2_stream_create_texture_sampler_bind_group_layout()¶
Append a CreateBindGroupLayout command for one sampled texture and one sampler.
_Bool dvz_drp2_stream_create_texture_sampler_bind_group_layout(
DvzDrp2CommandStream * stream,
uint64_t id
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the command was appended |
stream |
DvzDrp2CommandStream * |
the command stream |
id |
uint64_t |
the bind-group layout id |
Declared in include/datoviz/drp2/stream.h:573.
dvz_drp2_stream_create_uniform_bind_group()¶
Append a CreateBindGroup command for one uniform buffer with a sub-allocation offset.
_Bool dvz_drp2_stream_create_uniform_bind_group(
DvzDrp2CommandStream * stream,
uint64_t id,
uint64_t bind_group_layout_id,
uint64_t buffer_id,
uint64_t offset,
uint64_t size
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the command was appended |
stream |
DvzDrp2CommandStream * |
the command stream |
id |
uint64_t |
the bind-group id |
bind_group_layout_id |
uint64_t |
the bind-group layout id |
buffer_id |
uint64_t |
the uniform buffer id |
offset |
uint64_t |
byte offset into the buffer for this sub-allocation |
size |
uint64_t |
bound range size in bytes |
Declared in include/datoviz/drp2/stream.h:662.
dvz_drp2_stream_create_uniform_bind_group_layout()¶
Append a CreateBindGroupLayout command for one uniform buffer (VS + FS visible).
_Bool dvz_drp2_stream_create_uniform_bind_group_layout(
DvzDrp2CommandStream * stream,
uint64_t id
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the command was appended |
stream |
DvzDrp2CommandStream * |
the command stream |
id |
uint64_t |
the bind-group layout id |
Declared in include/datoviz/drp2/stream.h:597.
dvz_drp2_stream_destroy()¶
Destroy a DRP2 command stream.
void dvz_drp2_stream_destroy(
DvzDrp2CommandStream * stream
);
| Field | Type | Description |
|---|---|---|
stream |
DvzDrp2CommandStream * |
the command stream |
Declared in include/datoviz/drp2/stream.h:49.
dvz_drp2_stream_destroy_bind_group()¶
Append a DestroyBindGroup command.
_Bool dvz_drp2_stream_destroy_bind_group(
DvzDrp2CommandStream * stream,
uint64_t bind_group_id
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the command was appended |
stream |
DvzDrp2CommandStream * |
the command stream |
bind_group_id |
uint64_t |
the bind-group id |
Declared in include/datoviz/drp2/stream.h:706.
dvz_drp2_stream_destroy_bind_group_layout()¶
Append a DestroyBindGroupLayout command.
_Bool dvz_drp2_stream_destroy_bind_group_layout(
DvzDrp2CommandStream * stream,
uint64_t bind_group_layout_id
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the command was appended |
stream |
DvzDrp2CommandStream * |
the command stream |
bind_group_layout_id |
uint64_t |
the bind-group layout id |
Declared in include/datoviz/drp2/stream.h:693.
dvz_drp2_stream_destroy_buffer()¶
Append a DestroyBuffer command.
_Bool dvz_drp2_stream_destroy_buffer(
DvzDrp2CommandStream * stream,
uint64_t buffer_id
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the command was appended |
stream |
DvzDrp2CommandStream * |
the command stream |
buffer_id |
uint64_t |
the buffer id |
Declared in include/datoviz/drp2/stream.h:169.
dvz_drp2_stream_destroy_compute_pipeline()¶
Append a DestroyComputePipeline command.
_Bool dvz_drp2_stream_destroy_compute_pipeline(
DvzDrp2CommandStream * stream,
uint64_t compute_pipeline_id
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the command was appended |
stream |
DvzDrp2CommandStream * |
the command stream |
compute_pipeline_id |
uint64_t |
the compute pipeline id |
Declared in include/datoviz/drp2/stream.h:535.
dvz_drp2_stream_destroy_render_pipeline()¶
Append a DestroyRenderPipeline command.
_Bool dvz_drp2_stream_destroy_render_pipeline(
DvzDrp2CommandStream * stream,
uint64_t render_pipeline_id
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the command was appended |
stream |
DvzDrp2CommandStream * |
the command stream |
render_pipeline_id |
uint64_t |
the render pipeline id |
Declared in include/datoviz/drp2/stream.h:496.
dvz_drp2_stream_destroy_shader_module()¶
Append a DestroyShaderModule command.
_Bool dvz_drp2_stream_destroy_shader_module(
DvzDrp2CommandStream * stream,
uint64_t shader_module_id
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the command was appended |
stream |
DvzDrp2CommandStream * |
the command stream |
shader_module_id |
uint64_t |
the shader module id |
Declared in include/datoviz/drp2/stream.h:349.
dvz_drp2_stream_destroy_texture()¶
Append a DestroyTexture command.
_Bool dvz_drp2_stream_destroy_texture(
DvzDrp2CommandStream * stream,
uint64_t texture_id
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the command was appended |
stream |
DvzDrp2CommandStream * |
the command stream |
texture_id |
uint64_t |
the texture id |
Declared in include/datoviz/drp2/stream.h:275.
dvz_drp2_stream_dispatch_workgroups()¶
Append a DispatchWorkgroups command.
_Bool dvz_drp2_stream_dispatch_workgroups(
DvzDrp2CommandStream * stream,
uint64_t pass_id,
uint32_t x,
uint32_t y,
uint32_t z
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the command was appended |
stream |
DvzDrp2CommandStream * |
the command stream |
pass_id |
uint64_t |
the compute pass id |
x |
uint32_t |
the x workgroup count |
y |
uint32_t |
the y workgroup count |
z |
uint32_t |
the z workgroup count |
Declared in include/datoviz/drp2/stream.h:1266.
dvz_drp2_stream_draw()¶
Append a Draw command.
_Bool dvz_drp2_stream_draw(
DvzDrp2CommandStream * stream,
uint64_t pass_id,
uint32_t vertex_count,
uint32_t instance_count,
uint32_t first_vertex,
uint32_t first_instance
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the command was appended |
stream |
DvzDrp2CommandStream * |
the command stream |
pass_id |
uint64_t |
the pass id |
vertex_count |
uint32_t |
the vertex count |
instance_count |
uint32_t |
the instance count |
first_vertex |
uint32_t |
the first vertex |
first_instance |
uint32_t |
the first instance |
Declared in include/datoviz/drp2/stream.h:1221.
dvz_drp2_stream_draw_indexed()¶
Append a DrawIndexed command.
_Bool dvz_drp2_stream_draw_indexed(
DvzDrp2CommandStream * stream,
uint64_t pass_id,
uint32_t index_count,
uint32_t instance_count,
uint32_t first_index,
int32_t base_vertex,
uint32_t first_instance
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the command was appended |
stream |
DvzDrp2CommandStream * |
the command stream |
pass_id |
uint64_t |
the pass id |
index_count |
uint32_t |
the index count |
instance_count |
uint32_t |
the instance count |
first_index |
uint32_t |
the first index |
base_vertex |
int32_t |
the base vertex |
first_instance |
uint32_t |
the first instance |
Declared in include/datoviz/drp2/stream.h:1239.
dvz_drp2_stream_end_compute_pass()¶
Append an EndComputePass command.
_Bool dvz_drp2_stream_end_compute_pass(
DvzDrp2CommandStream * stream,
uint64_t pass_id
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the command was appended |
stream |
DvzDrp2CommandStream * |
the command stream |
pass_id |
uint64_t |
the compute pass id |
Declared in include/datoviz/drp2/stream.h:1278.
dvz_drp2_stream_end_render_pass()¶
Append an EndRenderPass command.
_Bool dvz_drp2_stream_end_render_pass(
DvzDrp2CommandStream * stream,
uint64_t pass_id
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the command was appended |
stream |
DvzDrp2CommandStream * |
the command stream |
pass_id |
uint64_t |
the pass id |
Declared in include/datoviz/drp2/stream.h:1252.
dvz_drp2_stream_finish_command_encoder()¶
Append a FinishCommandEncoder command.
_Bool dvz_drp2_stream_finish_command_encoder(
DvzDrp2CommandStream * stream,
uint64_t encoder_id,
uint64_t command_buffer_id
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the command was appended |
stream |
DvzDrp2CommandStream * |
the command stream |
encoder_id |
uint64_t |
the encoder id |
command_buffer_id |
uint64_t |
the command buffer id |
Declared in include/datoviz/drp2/stream.h:1390.
dvz_drp2_stream_get()¶
Return a command from a DRP2 command stream.
const DvzDrp2Command * dvz_drp2_stream_get(
const DvzDrp2CommandStream * stream,
uint32_t index
);
| Field | Type | Description |
|---|---|---|
| return | const DvzDrp2Command * |
the command, or NULL when index is out of bounds |
stream |
const DvzDrp2CommandStream * |
the command stream |
index |
uint32_t |
the command index |
Declared in include/datoviz/drp2/stream.h:71.
dvz_drp2_stream_hello_renderer()¶
Append a HelloRenderer command.
_Bool dvz_drp2_stream_hello_renderer(
DvzDrp2CommandStream * stream,
const char * client_name
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the command was appended |
stream |
DvzDrp2CommandStream * |
the command stream |
client_name |
const char * |
the client name |
Declared in include/datoviz/drp2/stream.h:132.
dvz_drp2_stream_json()¶
Serialize a command stream as a DRP2 fixture JSON document.
char * dvz_drp2_stream_json(
const DvzDrp2CommandStream * stream,
const char * name
);
| Field | Type | Description |
|---|---|---|
| return | char * |
an owned NUL-terminated JSON string |
stream |
const DvzDrp2CommandStream * |
the command stream |
name |
const char * |
the fixture name |
Declared in include/datoviz/drp2/stream.h:1433.
dvz_drp2_stream_json_destroy()¶
Destroy a JSON string returned by dvz_drp2_stream_json().
void dvz_drp2_stream_json_destroy(
char * json
);
| Field | Type | Description |
|---|---|---|
json |
char * |
the JSON string |
Declared in include/datoviz/drp2/stream.h:1500.
dvz_drp2_stream_json_payload_refs()¶
Serialize a command stream as JSON with write payloads referenced by index.
WriteBuffer and WriteTexture commands backed by in-process raw bytes are serialized with a
data_ref index and data_encoding: "wasm-memory" instead of inline base64. The referenced
payloads are available through dvz_drp2_stream_payload_*(). Commands that only have a base64
payload keep the normal inline data field.
char * dvz_drp2_stream_json_payload_refs(
const DvzDrp2CommandStream * stream,
const char * name
);
| Field | Type | Description |
|---|---|---|
| return | char * |
an owned NUL-terminated JSON string |
stream |
const DvzDrp2CommandStream * |
the command stream |
name |
const char * |
the fixture name |
Declared in include/datoviz/drp2/stream.h:1449.
dvz_drp2_stream_label()¶
Return a debug label attached to a numeric DRP2 id.
const char * dvz_drp2_stream_label(
const DvzDrp2CommandStream * stream,
uint64_t id
);
| Field | Type | Description |
|---|---|---|
| return | const char * |
the label, or NULL when the stream has no label for the id |
stream |
const DvzDrp2CommandStream * |
the command stream |
id |
uint64_t |
the DRP2 object or transient id |
Declared in include/datoviz/drp2/stream.h:98.
dvz_drp2_stream_label_id()¶
Return the numeric DRP2 id attached to a debug label.
uint64_t dvz_drp2_stream_label_id(
const DvzDrp2CommandStream * stream,
const char * label
);
| Field | Type | Description |
|---|---|---|
| return | uint64_t |
the id, or 0 when the stream has no id for the label |
stream |
const DvzDrp2CommandStream * |
the command stream |
label |
const char * |
the debug label |
Declared in include/datoviz/drp2/stream.h:110.
dvz_drp2_stream_payload_command_index()¶
Return the command index owning a raw binary payload.
uint32_t dvz_drp2_stream_payload_command_index(
const DvzDrp2CommandStream * stream,
uint32_t payload_index
);
| Field | Type | Description |
|---|---|---|
| return | uint32_t |
the command index, or UINT32_MAX when not found |
stream |
const DvzDrp2CommandStream * |
the command stream |
payload_index |
uint32_t |
the payload index |
Declared in include/datoviz/drp2/stream.h:1469.
dvz_drp2_stream_payload_count()¶
Return the number of raw binary write payloads in a command stream.
uint32_t dvz_drp2_stream_payload_count(
const DvzDrp2CommandStream * stream
);
| Field | Type | Description |
|---|---|---|
| return | uint32_t |
the number of raw payload spans |
stream |
const DvzDrp2CommandStream * |
the command stream |
Declared in include/datoviz/drp2/stream.h:1458.
dvz_drp2_stream_payload_ptr()¶
Return the raw binary payload pointer for a payload index.
const void * dvz_drp2_stream_payload_ptr(
const DvzDrp2CommandStream * stream,
uint32_t payload_index
);
| Field | Type | Description |
|---|---|---|
| return | const void * |
the borrowed payload pointer, or NULL when not found |
stream |
const DvzDrp2CommandStream * |
the command stream |
payload_index |
uint32_t |
the payload index |
Declared in include/datoviz/drp2/stream.h:1480.
dvz_drp2_stream_payload_size()¶
Return the raw binary payload byte size for a payload index.
uint64_t dvz_drp2_stream_payload_size(
const DvzDrp2CommandStream * stream,
uint32_t payload_index
);
| Field | Type | Description |
|---|---|---|
| return | uint64_t |
the payload byte size, or 0 when not found |
stream |
const DvzDrp2CommandStream * |
the command stream |
payload_index |
uint32_t |
the payload index |
Declared in include/datoviz/drp2/stream.h:1491.
dvz_drp2_stream_pipeline_set_bind_group_layout()¶
Attach a bind-group layout to the most recently appended CreateRenderPipeline command.
Descriptor-based creation can set bind-group layouts directly. This helper remains available for incremental stream-building code that appends optional layout state after creation.
_Bool dvz_drp2_stream_pipeline_set_bind_group_layout(
DvzDrp2CommandStream * stream,
uint64_t bind_group_layout_id
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the most recent command was a CreateRenderPipeline and was updated |
stream |
DvzDrp2CommandStream * |
the command stream |
bind_group_layout_id |
uint64_t |
the bind-group layout id (0 = none) |
Declared in include/datoviz/drp2/stream.h:388.
dvz_drp2_stream_pipeline_set_bind_group_layouts()¶
Attach an ordered bind-group layout array to the most recent CreateRenderPipeline command.
_Bool dvz_drp2_stream_pipeline_set_bind_group_layouts(
DvzDrp2CommandStream * stream,
uint32_t count,
const uint64_t * bind_group_layout_ids
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the most recent command was updated |
stream |
DvzDrp2CommandStream * |
the command stream |
count |
uint32_t |
the number of bind-group layout ids |
bind_group_layout_ids |
const uint64_t * |
ordered bind-group layout ids, one per slot |
Declared in include/datoviz/drp2/stream.h:401.
dvz_drp2_stream_pipeline_set_builtin_identity()¶
Attach optional built-in pipeline identity metadata to a CreateRenderPipeline command.
_Bool dvz_drp2_stream_pipeline_set_builtin_identity(
DvzDrp2CommandStream * stream,
uint64_t render_pipeline_id,
const char * pipeline,
uint32_t version
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the matching command was found and updated |
stream |
DvzDrp2CommandStream * |
the command stream |
render_pipeline_id |
uint64_t |
the render pipeline id |
pipeline |
const char * |
stable built-in pipeline id |
version |
uint32_t |
built-in pipeline contract version |
Declared in include/datoviz/drp2/stream.h:482.
dvz_drp2_stream_pipeline_set_color_blend()¶
Set one color target blend state on the most recently appended CreateRenderPipeline command.
_Bool dvz_drp2_stream_pipeline_set_color_blend(
DvzDrp2CommandStream * stream,
uint32_t idx,
DvzBlendFactor src_color,
DvzBlendFactor dst_color,
DvzBlendOp color_op,
DvzBlendFactor src_alpha,
DvzBlendFactor dst_alpha,
DvzBlendOp alpha_op,
DvzColorMask color_write_mask
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the most recent command was a CreateRenderPipeline and was updated |
stream |
DvzDrp2CommandStream * |
the command stream |
idx |
uint32_t |
the color target index |
src_color |
DvzBlendFactor |
source color blend factor |
dst_color |
DvzBlendFactor |
destination color blend factor |
color_op |
DvzBlendOp |
color blend operation |
src_alpha |
DvzBlendFactor |
source alpha blend factor |
dst_alpha |
DvzBlendFactor |
destination alpha blend factor |
alpha_op |
DvzBlendOp |
alpha blend operation |
color_write_mask |
DvzColorMask |
color component write mask |
Declared in include/datoviz/drp2/stream.h:467.
dvz_drp2_stream_pipeline_set_color_target()¶
Set one color target format on the most recently appended CreateRenderPipeline command.
_Bool dvz_drp2_stream_pipeline_set_color_target(
DvzDrp2CommandStream * stream,
uint32_t idx,
DvzFormat format
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the most recent command was a CreateRenderPipeline and was updated |
stream |
DvzDrp2CommandStream * |
the command stream |
idx |
uint32_t |
the color target index |
format |
DvzFormat |
texture format token |
Declared in include/datoviz/drp2/stream.h:449.
dvz_drp2_stream_pipeline_set_depth_state()¶
Attach depth state to the most recently appended CreateRenderPipeline command.
_Bool dvz_drp2_stream_pipeline_set_depth_state(
DvzDrp2CommandStream * stream,
_Bool depth_write_enabled,
DvzCompareOp depth_compare_op
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the most recent command was a CreateRenderPipeline and was updated |
stream |
DvzDrp2CommandStream * |
the command stream |
depth_write_enabled |
_Bool |
whether depth writes are enabled |
depth_compare_op |
DvzCompareOp |
depth compare operation |
Declared in include/datoviz/drp2/stream.h:413.
dvz_drp2_stream_pipeline_set_multisampling()¶
Set multisampling state on the most recently appended CreateRenderPipeline command.
_Bool dvz_drp2_stream_pipeline_set_multisampling(
DvzDrp2CommandStream * stream,
uint32_t sample_count,
_Bool alpha_to_coverage_enabled
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the most recent command was a CreateRenderPipeline and was updated |
stream |
DvzDrp2CommandStream * |
the command stream |
sample_count |
uint32_t |
raster sample count, with 0 treated as 1 |
alpha_to_coverage_enabled |
_Bool |
whether alpha-to-coverage is enabled |
Declared in include/datoviz/drp2/stream.h:437.
dvz_drp2_stream_pipeline_set_raster_state()¶
Attach raster state to the most recently appended CreateRenderPipeline command.
_Bool dvz_drp2_stream_pipeline_set_raster_state(
DvzDrp2CommandStream * stream,
DvzCullMode cull_mode,
DvzFrontFace front_face
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the most recent command was a CreateRenderPipeline and was updated |
stream |
DvzDrp2CommandStream * |
the command stream |
cull_mode |
DvzCullMode |
face culling mode |
front_face |
DvzFrontFace |
front-face winding |
Declared in include/datoviz/drp2/stream.h:425.
dvz_drp2_stream_queue_submit()¶
Append a QueueSubmit command with one command buffer and no readback.
_Bool dvz_drp2_stream_queue_submit(
DvzDrp2CommandStream * stream,
uint64_t command_buffer_id,
uint64_t submission_id
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the command was appended |
stream |
DvzDrp2CommandStream * |
the command stream |
command_buffer_id |
uint64_t |
the command buffer id |
submission_id |
uint64_t |
the submission id |
Declared in include/datoviz/drp2/stream.h:1403.
dvz_drp2_stream_queue_submit_readback()¶
Append a QueueSubmit command with one command buffer and one readback request.
_Bool dvz_drp2_stream_queue_submit_readback(
DvzDrp2CommandStream * stream,
uint64_t command_buffer_id,
uint64_t submission_id,
uint64_t buffer_id,
uint64_t offset,
uint64_t size
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the command was appended |
stream |
DvzDrp2CommandStream * |
the command stream |
command_buffer_id |
uint64_t |
the command buffer id |
submission_id |
uint64_t |
the submission id |
buffer_id |
uint64_t |
the readback buffer id |
offset |
uint64_t |
the readback byte offset |
size |
uint64_t |
the readback byte size |
Declared in include/datoviz/drp2/stream.h:1419.
dvz_drp2_stream_renderer_hello_reply()¶
Append a RendererHelloReply command.
_Bool dvz_drp2_stream_renderer_hello_reply(
DvzDrp2CommandStream * stream,
const char * renderer_name
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the command was appended |
stream |
DvzDrp2CommandStream * |
the command stream |
renderer_name |
const char * |
the renderer name |
Declared in include/datoviz/drp2/stream.h:144.
dvz_drp2_stream_resource_barrier()¶
Append a ResourceBarrier command for a buffer range.
The first active DRP2 barrier slice covers compute storage writes made visible to a later vertex input or copy read in the same command encoder.
_Bool dvz_drp2_stream_resource_barrier(
DvzDrp2CommandStream * stream,
uint64_t encoder_id,
uint64_t buffer_id,
const char * src_stage,
const char * src_access,
const char * dst_stage,
const char * dst_access,
uint64_t offset,
uint64_t size
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the command was appended |
stream |
DvzDrp2CommandStream * |
the command stream |
encoder_id |
uint64_t |
the open command encoder id |
buffer_id |
uint64_t |
the buffer id |
src_stage |
const char * |
the producer stage, such as "COMPUTE" |
src_access |
const char * |
the producer access, such as "STORAGE_WRITE" |
dst_stage |
const char * |
the consumer stage, such as "VERTEX_INPUT" or "COPY" |
dst_access |
const char * |
the consumer access, such as "VERTEX_READ" or "COPY_READ" |
offset |
uint64_t |
the first byte in the synchronized range |
size |
uint64_t |
the synchronized byte size, or 0 for the rest of the buffer |
Declared in include/datoviz/drp2/stream.h:1298.
dvz_drp2_stream_set_bind_group()¶
Append a SetBindGroup command.
_Bool dvz_drp2_stream_set_bind_group(
DvzDrp2CommandStream * stream,
uint64_t pass_id,
uint32_t slot,
uint64_t bind_group_id
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the command was appended |
stream |
DvzDrp2CommandStream * |
the command stream |
pass_id |
uint64_t |
the pass id |
slot |
uint32_t |
the bind-group slot |
bind_group_id |
uint64_t |
the bind-group id |
Declared in include/datoviz/drp2/stream.h:1157.
dvz_drp2_stream_set_bind_group_dynamic()¶
Append a SetBindGroup command with dynamic offsets.
_Bool dvz_drp2_stream_set_bind_group_dynamic(
DvzDrp2CommandStream * stream,
uint64_t pass_id,
uint32_t slot,
uint64_t bind_group_id,
uint32_t dynamic_offset_count,
const uint64_t * dynamic_offsets
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the command was appended |
stream |
DvzDrp2CommandStream * |
the command stream |
pass_id |
uint64_t |
the pass id |
slot |
uint32_t |
the bind-group slot |
bind_group_id |
uint64_t |
the bind-group id |
dynamic_offset_count |
uint32_t |
number of dynamic offsets |
dynamic_offsets |
const uint64_t * |
dynamic offsets consumed in layout-entry order |
Declared in include/datoviz/drp2/stream.h:1172.
dvz_drp2_stream_set_index_buffer()¶
Append a SetIndexBuffer command.
_Bool dvz_drp2_stream_set_index_buffer(
DvzDrp2CommandStream * stream,
uint64_t pass_id,
uint64_t buffer_id,
const char * index_format,
uint64_t offset
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the command was appended |
stream |
DvzDrp2CommandStream * |
the command stream |
pass_id |
uint64_t |
the pass id |
buffer_id |
uint64_t |
the index buffer id |
index_format |
const char * |
the index format token |
offset |
uint64_t |
the byte offset |
Declared in include/datoviz/drp2/stream.h:1204.
dvz_drp2_stream_set_label()¶
Attach a debug label to a numeric DRP2 id in a command stream.
Labels are diagnostic metadata only: runtimes ignore them and they are not executable commands.
_Bool dvz_drp2_stream_set_label(
DvzDrp2CommandStream * stream,
uint64_t id,
const char * label
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the label was recorded |
stream |
DvzDrp2CommandStream * |
the command stream |
id |
uint64_t |
the DRP2 object or transient id |
label |
const char * |
the debug label, or NULL to clear it to an empty string |
Declared in include/datoviz/drp2/stream.h:86.
dvz_drp2_stream_set_pipeline()¶
Append a SetPipeline command.
_Bool dvz_drp2_stream_set_pipeline(
DvzDrp2CommandStream * stream,
uint64_t pass_id,
uint64_t pipeline_id
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the command was appended |
stream |
DvzDrp2CommandStream * |
the command stream |
pass_id |
uint64_t |
the pass id |
pipeline_id |
uint64_t |
the pipeline id |
Declared in include/datoviz/drp2/stream.h:1144.
dvz_drp2_stream_set_scissor()¶
Append a SetScissor command.
_Bool dvz_drp2_stream_set_scissor(
DvzDrp2CommandStream * stream,
uint64_t pass_id,
float x,
float y,
float width,
float height
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the command was appended |
stream |
DvzDrp2CommandStream * |
the command stream |
pass_id |
uint64_t |
the render pass id |
x |
float |
normalized left coordinate in attachment space [0, 1] |
y |
float |
normalized top coordinate in attachment space [0, 1] |
width |
float |
normalized width in attachment space [0, 1] |
height |
float |
normalized height in attachment space [0, 1] |
Declared in include/datoviz/drp2/stream.h:1130.
dvz_drp2_stream_set_vertex_buffer()¶
Append a SetVertexBuffer command.
_Bool dvz_drp2_stream_set_vertex_buffer(
DvzDrp2CommandStream * stream,
uint64_t pass_id,
uint32_t slot,
uint64_t buffer_id,
uint64_t offset
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the command was appended |
stream |
DvzDrp2CommandStream * |
the command stream |
pass_id |
uint64_t |
the pass id |
slot |
uint32_t |
the vertex buffer slot |
buffer_id |
uint64_t |
the buffer id |
offset |
uint64_t |
the byte offset |
Declared in include/datoviz/drp2/stream.h:1188.
dvz_drp2_stream_set_viewport()¶
Append a SetViewport command.
_Bool dvz_drp2_stream_set_viewport(
DvzDrp2CommandStream * stream,
uint64_t pass_id,
float x,
float y,
float width,
float height
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the command was appended |
stream |
DvzDrp2CommandStream * |
the command stream |
pass_id |
uint64_t |
the render pass id |
x |
float |
normalized left coordinate in attachment space [0, 1] |
y |
float |
normalized top coordinate in attachment space [0, 1] |
width |
float |
normalized width in attachment space [0, 1] |
height |
float |
normalized height in attachment space [0, 1] |
Declared in include/datoviz/drp2/stream.h:1114.
dvz_drp2_stream_shader_set_builtin_identity()¶
Attach optional built-in shader identity metadata to a CreateShaderModule command.
_Bool dvz_drp2_stream_shader_set_builtin_identity(
DvzDrp2CommandStream * stream,
uint64_t shader_module_id,
const char * family,
const char * variant,
uint32_t version
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the matching command was found and updated |
stream |
DvzDrp2CommandStream * |
the command stream |
shader_module_id |
uint64_t |
the shader module id |
family |
const char * |
stable built-in shader family id |
variant |
const char * |
stable built-in shader variant id |
version |
uint32_t |
built-in shader contract version |
Declared in include/datoviz/drp2/stream.h:335.
dvz_drp2_stream_write_buffer_base64()¶
Append a WriteBuffer command.
_Bool dvz_drp2_stream_write_buffer_base64(
DvzDrp2CommandStream * stream,
uint64_t buffer_id,
uint64_t offset,
uint64_t size,
const char * data_base64
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the command was appended |
stream |
DvzDrp2CommandStream * |
the command stream |
buffer_id |
uint64_t |
the buffer id |
offset |
uint64_t |
the byte offset |
size |
uint64_t |
the payload size in bytes |
data_base64 |
const char * |
base64-encoded payload |
Declared in include/datoviz/drp2/stream.h:720.
dvz_drp2_stream_write_buffer_bytes()¶
Append a WriteBuffer command from raw bytes.
In-process callers that have a raw byte pointer should prefer this entry point over dvz_drp2_stream_write_buffer_base64 (which takes a pre-encoded base64 string and is intended for JSON wire-loading paths).
The stream owns a copy of data. The base64 string is computed lazily, only
if the stream is later serialized to JSON.
size==0 is a valid WebGPU-shaped no-op: returns true without recording a
command and does not retain data (which may legitimately be NULL).
_Bool dvz_drp2_stream_write_buffer_bytes(
DvzDrp2CommandStream * stream,
uint64_t buffer_id,
uint64_t offset,
uint64_t size,
const void * data
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the call succeeded (true on size==0 no-op even though no command was recorded) |
stream |
DvzDrp2CommandStream * |
the command stream |
buffer_id |
uint64_t |
the destination buffer id |
offset |
uint64_t |
byte offset within the buffer |
size |
uint64_t |
number of bytes to write (0 is a valid no-op) |
data |
const void * |
raw source bytes (must be non-NULL when size>0) |
Declared in include/datoviz/drp2/stream.h:746.
dvz_drp2_stream_write_texture_2d_base64()¶
Append a WriteTexture command.
_Bool dvz_drp2_stream_write_texture_2d_base64(
DvzDrp2CommandStream * stream,
uint64_t texture_id,
uint32_t mip_level,
uint32_t width,
uint32_t height,
uint32_t bytes_per_row,
uint32_t rows_per_image,
const char * data_base64
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the command was appended |
stream |
DvzDrp2CommandStream * |
the command stream |
texture_id |
uint64_t |
the destination texture id |
mip_level |
uint32_t |
the destination mip level |
width |
uint32_t |
the written width |
height |
uint32_t |
the written height |
bytes_per_row |
uint32_t |
the source bytes per row |
rows_per_image |
uint32_t |
the source rows per image |
data_base64 |
const char * |
base64-encoded payload |
Declared in include/datoviz/drp2/stream.h:765.
dvz_drp2_stream_write_texture_2d_borrowed()¶
Append a WriteTexture command for a full 2D mip level using borrowed raw bytes.
The runtime path consumes the borrowed pointer directly with no base64 round-trip. JSON
serialization re-encodes lazily. The caller must keep data alive until the stream has executed
or has been serialized.
_Bool dvz_drp2_stream_write_texture_2d_borrowed(
DvzDrp2CommandStream * stream,
uint64_t texture_id,
uint32_t mip_level,
uint32_t width,
uint32_t height,
uint32_t bytes_per_row,
uint32_t rows_per_image,
const void * data
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the command was appended |
stream |
DvzDrp2CommandStream * |
the command stream |
texture_id |
uint64_t |
the destination texture id |
mip_level |
uint32_t |
the destination mip level |
width |
uint32_t |
the written width |
height |
uint32_t |
the written height |
bytes_per_row |
uint32_t |
the source bytes per row |
rows_per_image |
uint32_t |
the source rows per image |
data |
const void * |
raw pixel bytes (must remain valid until the stream executes) |
Declared in include/datoviz/drp2/stream.h:787.
dvz_drp2_stream_write_texture_2d_region_base64()¶
Append a WriteTexture command for a 2D sub-region with explicit origin.
_Bool dvz_drp2_stream_write_texture_2d_region_base64(
DvzDrp2CommandStream * stream,
uint64_t texture_id,
uint32_t mip_level,
uint32_t origin_x,
uint32_t origin_y,
uint32_t width,
uint32_t height,
uint32_t bytes_per_row,
uint32_t rows_per_image,
const char * data_base64
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the command was appended |
stream |
DvzDrp2CommandStream * |
the command stream |
texture_id |
uint64_t |
the destination texture id |
mip_level |
uint32_t |
the destination mip level |
origin_x |
uint32_t |
x offset in texels |
origin_y |
uint32_t |
y offset in texels |
width |
uint32_t |
the written width |
height |
uint32_t |
the written height |
bytes_per_row |
uint32_t |
the source bytes per row |
rows_per_image |
uint32_t |
the source rows per image |
data_base64 |
const char * |
base64-encoded payload |
Declared in include/datoviz/drp2/stream.h:830.
dvz_drp2_stream_write_texture_2d_region_borrowed()¶
Append a WriteTexture command for a 2D sub-region using borrowed raw bytes.
Mirrors dvz_drp2_stream_write_texture_2d_borrowed for the in-process runtime path.
_Bool dvz_drp2_stream_write_texture_2d_region_borrowed(
DvzDrp2CommandStream * stream,
uint64_t texture_id,
uint32_t mip_level,
uint32_t origin_x,
uint32_t origin_y,
uint32_t width,
uint32_t height,
uint32_t bytes_per_row,
uint32_t rows_per_image,
const void * data
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the command was appended |
stream |
DvzDrp2CommandStream * |
the command stream |
texture_id |
uint64_t |
the destination texture id |
mip_level |
uint32_t |
the destination mip level |
origin_x |
uint32_t |
x offset in texels |
origin_y |
uint32_t |
y offset in texels |
width |
uint32_t |
the written width |
height |
uint32_t |
the written height |
bytes_per_row |
uint32_t |
the source bytes per row |
rows_per_image |
uint32_t |
the source rows per image |
data |
const void * |
raw pixel bytes (must remain valid until the stream executes) |
Declared in include/datoviz/drp2/stream.h:809.
dvz_drp2_stream_write_texture_3d_base64()¶
Append a WriteTexture command for a 3D sub-region.
_Bool dvz_drp2_stream_write_texture_3d_base64(
DvzDrp2CommandStream * stream,
uint64_t texture_id,
uint32_t mip_level,
uint32_t origin_x,
uint32_t origin_y,
uint32_t origin_z,
uint32_t width,
uint32_t height,
uint32_t depth,
uint32_t bytes_per_row,
uint32_t rows_per_image,
const char * data_base64
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the command was appended |
stream |
DvzDrp2CommandStream * |
the command stream |
texture_id |
uint64_t |
the destination texture id |
mip_level |
uint32_t |
the destination mip level |
origin_x |
uint32_t |
x offset in texels |
origin_y |
uint32_t |
y offset in texels |
origin_z |
uint32_t |
z offset in texels |
width |
uint32_t |
the written width |
height |
uint32_t |
the written height |
depth |
uint32_t |
the written depth |
bytes_per_row |
uint32_t |
the source bytes per row |
rows_per_image |
uint32_t |
the source rows per image |
data_base64 |
const char * |
base64-encoded payload |
Declared in include/datoviz/drp2/stream.h:854.
dvz_drp2_stream_write_texture_3d_borrowed()¶
Append a WriteTexture command for a 3D sub-region using borrowed raw bytes.
Mirrors dvz_drp2_stream_write_texture_2d_borrowed for 3D texture uploads.
_Bool dvz_drp2_stream_write_texture_3d_borrowed(
DvzDrp2CommandStream * stream,
uint64_t texture_id,
uint32_t mip_level,
uint32_t origin_x,
uint32_t origin_y,
uint32_t origin_z,
uint32_t width,
uint32_t height,
uint32_t depth,
uint32_t bytes_per_row,
uint32_t rows_per_image,
const void * data
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the command was appended |
stream |
DvzDrp2CommandStream * |
the command stream |
texture_id |
uint64_t |
the destination texture id |
mip_level |
uint32_t |
the destination mip level |
origin_x |
uint32_t |
x offset in texels |
origin_y |
uint32_t |
y offset in texels |
origin_z |
uint32_t |
z offset in texels |
width |
uint32_t |
the written width |
height |
uint32_t |
the written height |
depth |
uint32_t |
the written depth |
bytes_per_row |
uint32_t |
the source bytes per row |
rows_per_image |
uint32_t |
the source rows per image |
data |
const void * |
raw pixel bytes (must remain valid until the stream executes) |
Declared in include/datoviz/drp2/stream.h:880.
dvz_drp2_texture_desc()¶
Return the default CreateTexture descriptor.
DvzDrp2TextureDesc dvz_drp2_texture_desc(void);
| Field | Type | Description |
|---|---|---|
| return | DvzDrp2TextureDesc |
initialized descriptor |
Declared in include/datoviz/drp2/stream.h:178.
dvz_drp2_validate_stream()¶
Validate a DRP2 command stream against the backend-agnostic semantic rules.
DvzDrp2ValidationResult dvz_drp2_validate_stream(
const DvzDrp2CommandStream * stream
);
| Field | Type | Description |
|---|---|---|
| return | DvzDrp2ValidationResult |
the validation result |
stream |
const DvzDrp2CommandStream * |
the command stream |
Declared in include/datoviz/drp2/runtime.h:167.
Types
DvzBlendFactor · enum
enum DvzBlendFactor {
DVZ_BLEND_FACTOR_ZERO = 0,
DVZ_BLEND_FACTOR_ONE = 1,
DVZ_BLEND_FACTOR_SRC_COLOR = 2,
DVZ_BLEND_FACTOR_ONE_MINUS_SRC_COLOR = 3,
DVZ_BLEND_FACTOR_DST_COLOR = 4,
DVZ_BLEND_FACTOR_ONE_MINUS_DST_COLOR = 5,
DVZ_BLEND_FACTOR_SRC_ALPHA = 6,
DVZ_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA = 7,
DVZ_BLEND_FACTOR_DST_ALPHA = 8,
DVZ_BLEND_FACTOR_ONE_MINUS_DST_ALPHA = 9,
DVZ_BLEND_FACTOR_CONSTANT_COLOR = 10,
DVZ_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR = 11,
DVZ_BLEND_FACTOR_CONSTANT_ALPHA = 12,
DVZ_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA = 13,
DVZ_BLEND_FACTOR_SRC_ALPHA_SATURATE = 14,
};
Declared in include/datoviz/render_types.h:139.
DvzBlendOp · enum
enum DvzBlendOp {
DVZ_BLEND_OP_ADD = 0,
DVZ_BLEND_OP_SUBTRACT = 1,
DVZ_BLEND_OP_REVERSE_SUBTRACT = 2,
DVZ_BLEND_OP_MIN = 3,
DVZ_BLEND_OP_MAX = 4,
};
Declared in include/datoviz/render_types.h:161.
DvzColorMask · enum
enum DvzColorMask {
DVZ_MASK_COLOR_R = 1,
DVZ_MASK_COLOR_G = 2,
DVZ_MASK_COLOR_B = 4,
DVZ_MASK_COLOR_A = 8,
DVZ_MASK_COLOR_ALL = 15,
};
Declared in include/datoviz/render_types.h:173.
DvzCompareOp · enum
enum DvzCompareOp {
DVZ_COMPARE_OP_NEVER = 0,
DVZ_COMPARE_OP_LESS = 1,
DVZ_COMPARE_OP_EQUAL = 2,
DVZ_COMPARE_OP_LESS_OR_EQUAL = 3,
DVZ_COMPARE_OP_GREATER = 4,
DVZ_COMPARE_OP_NOT_EQUAL = 5,
DVZ_COMPARE_OP_GREATER_OR_EQUAL = 6,
DVZ_COMPARE_OP_ALWAYS = 7,
};
Declared in include/datoviz/render_types.h:104.
DvzCullMode · enum
enum DvzCullMode {
DVZ_CULL_MODE_NONE = 0,
DVZ_CULL_MODE_FRONT = 1,
DVZ_CULL_MODE_BACK = 2,
DVZ_CULL_MODE_FRONT_AND_BACK = 3,
};
Declared in include/datoviz/render_types.h:128.
DvzDrp2AttachmentAccess · enum
enum DvzDrp2AttachmentAccess {
DVZ_DRP2_ATTACHMENT_ACCESS_WRITE = 0,
DVZ_DRP2_ATTACHMENT_ACCESS_READ = 1,
DVZ_DRP2_ATTACHMENT_ACCESS_READ_WRITE = 2,
};
Declared in include/datoviz/drp2/enums.h:175.
DvzDrp2AttachmentLoadOp · enum
enum DvzDrp2AttachmentLoadOp {
DVZ_DRP2_ATTACHMENT_LOAD_CLEAR = 0,
DVZ_DRP2_ATTACHMENT_LOAD_LOAD = 1,
DVZ_DRP2_ATTACHMENT_LOAD_DONT_CARE = 2,
};
Declared in include/datoviz/drp2/enums.h:158.
DvzDrp2AttachmentStoreOp · enum
enum DvzDrp2AttachmentStoreOp {
DVZ_DRP2_ATTACHMENT_STORE_STORE = 0,
DVZ_DRP2_ATTACHMENT_STORE_DONT_CARE = 1,
};
Declared in include/datoviz/drp2/enums.h:167.
DvzDrp2BindGroupEntry · record
struct DvzDrp2BindGroupEntry {
uint32_t binding;
DvzDrp2BindingType binding_type;
DvzDrp2BindingResourceKind resource_kind;
uint64_t resource_id;
uint64_t offset;
uint64_t size;
};
Declared in include/datoviz/drp2/types.h:63.
DvzDrp2BindGroupLayoutEntry · record
struct DvzDrp2BindGroupLayoutEntry {
uint32_t binding;
DvzDrp2BindingType binding_type;
uint32_t visibility;
DvzDrp2BindingAccess access;
_Bool has_dynamic_offset;
};
Declared in include/datoviz/drp2/types.h:52.
DvzDrp2BindingAccess · enum
enum DvzDrp2BindingAccess {
DVZ_DRP2_BINDING_ACCESS_READ = 0,
DVZ_DRP2_BINDING_ACCESS_READ_WRITE = 1,
};
Declared in include/datoviz/drp2/enums.h:112.
DvzDrp2BindingResourceKind · enum
enum DvzDrp2BindingResourceKind {
DVZ_DRP2_BINDING_RESOURCE_NONE = 0,
DVZ_DRP2_BINDING_RESOURCE_BUFFER = 1,
DVZ_DRP2_BINDING_RESOURCE_TEXTURE = 2,
DVZ_DRP2_BINDING_RESOURCE_TEXTURE_VIEW = 3,
DVZ_DRP2_BINDING_RESOURCE_SAMPLER = 4,
};
Declared in include/datoviz/drp2/enums.h:120.
DvzDrp2BindingType · enum
enum DvzDrp2BindingType {
DVZ_DRP2_BINDING_TYPE_NONE = 0,
DVZ_DRP2_BINDING_TYPE_UNIFORM_BUFFER = 1,
DVZ_DRP2_BINDING_TYPE_STORAGE_BUFFER = 2,
DVZ_DRP2_BINDING_TYPE_SAMPLED_TEXTURE = 3,
DVZ_DRP2_BINDING_TYPE_STORAGE_TEXTURE = 4,
DVZ_DRP2_BINDING_TYPE_SAMPLER = 5,
};
Declared in include/datoviz/drp2/enums.h:93.
DvzDrp2BufferUsageFlags · enum
enum DvzDrp2BufferUsageFlags {
DVZ_DRP2_BUFFER_USAGE_NONE = 0,
DVZ_DRP2_BUFFER_USAGE_COPY_SRC = 1,
DVZ_DRP2_BUFFER_USAGE_COPY_DST = 2,
DVZ_DRP2_BUFFER_USAGE_MAP_READ = 4,
DVZ_DRP2_BUFFER_USAGE_MAP_WRITE = 8,
DVZ_DRP2_BUFFER_USAGE_VERTEX = 16,
DVZ_DRP2_BUFFER_USAGE_INDEX = 32,
DVZ_DRP2_BUFFER_USAGE_UNIFORM = 64,
DVZ_DRP2_BUFFER_USAGE_STORAGE = 128,
};
Declared in include/datoviz/drp2/enums.h:131.
DvzDrp2ColorAttachment · record
struct DvzDrp2ColorAttachment {
uint64_t texture_id;
uint64_t resolve_texture_id;
uint32_t resolve_mode;
_Bool clear;
DvzDrp2AttachmentLoadOp load_op;
DvzDrp2AttachmentStoreOp store_op;
DvzDrp2AttachmentAccess access;
float[4] clear_color;
};
Declared in include/datoviz/drp2/types.h:74.
DvzDrp2ColorRole · enum
enum DvzDrp2ColorRole {
DVZ_DRP2_COLOR_ROLE_NONE = 0,
DVZ_DRP2_COLOR_ROLE_SRGB_COLOR = 1,
DVZ_DRP2_COLOR_ROLE_LINEAR_COLOR = 2,
DVZ_DRP2_COLOR_ROLE_DATA = 3,
};
Declared in include/datoviz/drp2/enums.h:67.
DvzDrp2ColorTarget · record
struct DvzDrp2ColorTarget {
uint32_t format;
_Bool blend_enabled;
uint32_t src_color_blend_factor;
uint32_t dst_color_blend_factor;
uint32_t color_blend_op;
uint32_t src_alpha_blend_factor;
uint32_t dst_alpha_blend_factor;
uint32_t alpha_blend_op;
uint32_t color_write_mask;
};
Declared in include/datoviz/drp2/types.h:87.
DvzDrp2Command · typedef
typedef struct DvzDrp2Command DvzDrp2Command;
Declared in include/datoviz/drp2/types.h:36.
DvzDrp2CommandStream · typedef
typedef struct DvzDrp2CommandStream DvzDrp2CommandStream;
Declared in include/datoviz/drp2/types.h:35.
DvzDrp2CommandType · enum
enum DvzDrp2CommandType {
DVZ_DRP2_COMMAND_NONE = 0,
DVZ_DRP2_COMMAND_HELLO_RENDERER = 1,
DVZ_DRP2_COMMAND_RENDERER_HELLO_REPLY = 2,
DVZ_DRP2_COMMAND_CREATE_BUFFER = 3,
DVZ_DRP2_COMMAND_DESTROY_BUFFER = 4,
DVZ_DRP2_COMMAND_CREATE_TEXTURE = 5,
DVZ_DRP2_COMMAND_DESTROY_TEXTURE = 6,
DVZ_DRP2_COMMAND_CREATE_SHADER_MODULE = 7,
DVZ_DRP2_COMMAND_DESTROY_SHADER_MODULE = 8,
DVZ_DRP2_COMMAND_CREATE_RENDER_PIPELINE = 9,
DVZ_DRP2_COMMAND_DESTROY_RENDER_PIPELINE = 10,
DVZ_DRP2_COMMAND_CREATE_COMPUTE_PIPELINE = 11,
DVZ_DRP2_COMMAND_DESTROY_COMPUTE_PIPELINE = 12,
DVZ_DRP2_COMMAND_CREATE_SAMPLER = 13,
DVZ_DRP2_COMMAND_CREATE_BIND_GROUP_LAYOUT = 14,
DVZ_DRP2_COMMAND_CREATE_BIND_GROUP = 15,
DVZ_DRP2_COMMAND_DESTROY_BIND_GROUP_LAYOUT = 16,
DVZ_DRP2_COMMAND_DESTROY_BIND_GROUP = 17,
DVZ_DRP2_COMMAND_WRITE_BUFFER = 18,
DVZ_DRP2_COMMAND_WRITE_TEXTURE = 19,
DVZ_DRP2_COMMAND_BEGIN_COMMAND_ENCODER = 20,
DVZ_DRP2_COMMAND_BEGIN_RENDER_PASS = 21,
DVZ_DRP2_COMMAND_BEGIN_COMPUTE_PASS = 22,
DVZ_DRP2_COMMAND_SET_VIEWPORT = 23,
DVZ_DRP2_COMMAND_SET_SCISSOR = 24,
DVZ_DRP2_COMMAND_SET_PIPELINE = 25,
DVZ_DRP2_COMMAND_SET_BIND_GROUP = 26,
DVZ_DRP2_COMMAND_SET_VERTEX_BUFFER = 27,
DVZ_DRP2_COMMAND_SET_INDEX_BUFFER = 28,
DVZ_DRP2_COMMAND_DRAW = 29,
DVZ_DRP2_COMMAND_DRAW_INDEXED = 30,
DVZ_DRP2_COMMAND_END_RENDER_PASS = 31,
DVZ_DRP2_COMMAND_DISPATCH_WORKGROUPS = 32,
DVZ_DRP2_COMMAND_END_COMPUTE_PASS = 33,
DVZ_DRP2_COMMAND_RESOURCE_BARRIER = 34,
DVZ_DRP2_COMMAND_COPY_BUFFER_TO_BUFFER = 35,
DVZ_DRP2_COMMAND_COPY_BUFFER_TO_TEXTURE = 36,
DVZ_DRP2_COMMAND_COPY_TEXTURE_TO_BUFFER = 37,
DVZ_DRP2_COMMAND_COPY_TEXTURE_TO_TEXTURE = 38,
DVZ_DRP2_COMMAND_FINISH_COMMAND_ENCODER = 39,
DVZ_DRP2_COMMAND_QUEUE_SUBMIT = 40,
DVZ_DRP2_COMMAND_QUEUE_SUBMIT_REPLY = 41,
};
Declared in include/datoviz/drp2/enums.h:19.
DvzDrp2FilterMode · enum
enum DvzDrp2FilterMode {
DVZ_DRP2_FILTER_LINEAR = 0,
DVZ_DRP2_FILTER_NEAREST = 1,
};
Declared in include/datoviz/drp2/enums.h:104.
DvzDrp2RenderPassDesc · record
struct DvzDrp2RenderPassDesc {
uint32_t struct_size;
uint32_t flags;
uint64_t id;
uint64_t encoder_id;
uint32_t[4] render_area_px;
float[4] viewport_px;
float[4] scissor_px;
uint32_t color_attachment_count;
DvzDrp2ColorAttachment[4] color_attachments;
_Bool has_depth_attachment;
uint64_t depth_texture_id;
DvzDrp2AttachmentLoadOp depth_load_op;
DvzDrp2AttachmentStoreOp depth_store_op;
DvzDrp2AttachmentAccess depth_access;
_Bool depth_ops_explicit;
float clear_depth;
};
Declared in include/datoviz/drp2/types.h:116.
DvzDrp2RenderPipelineDesc · record
struct DvzDrp2RenderPipelineDesc {
uint32_t struct_size;
uint32_t flags;
uint64_t id;
uint64_t vertex_shader_module_id;
uint64_t fragment_shader_module_id;
uint32_t vertex_buffer_slots;
DvzPrimitiveTopology topology;
uint32_t bind_group_layout_count;
const uint64_t * bind_group_layout_ids;
uint32_t binding_count;
const uint32_t * binding_strides;
const uint32_t * binding_step_modes;
uint32_t attr_count;
const uint32_t * attr_bindings;
const uint32_t * attr_locations;
const DvzFormat * attr_formats;
const uint32_t * attr_offsets;
};
Declared in include/datoviz/drp2/types.h:137.
DvzDrp2ShaderStageFlags · enum
enum DvzDrp2ShaderStageFlags {
DVZ_DRP2_SHADER_STAGE_VERTEX = 1,
DVZ_DRP2_SHADER_STAGE_FRAGMENT = 2,
DVZ_DRP2_SHADER_STAGE_COMPUTE = 4,
};
Declared in include/datoviz/drp2/enums.h:84.
DvzDrp2TextureDesc · record
struct DvzDrp2TextureDesc {
uint32_t struct_size;
uint32_t flags;
uint64_t id;
uint32_t width;
uint32_t height;
uint32_t depth;
DvzFormat format;
uint32_t usage;
uint32_t sample_count;
DvzDrp2ColorRole color_role;
};
Declared in include/datoviz/drp2/types.h:101.
DvzDrp2TextureUsageFlags · enum
enum DvzDrp2TextureUsageFlags {
DVZ_DRP2_TEXTURE_USAGE_NONE = 0,
DVZ_DRP2_TEXTURE_USAGE_COPY_SRC = 1,
DVZ_DRP2_TEXTURE_USAGE_COPY_DST = 2,
DVZ_DRP2_TEXTURE_USAGE_TEXTURE_BINDING = 4,
DVZ_DRP2_TEXTURE_USAGE_STORAGE_BINDING = 8,
DVZ_DRP2_TEXTURE_USAGE_RENDER_ATTACHMENT = 16,
};
Declared in include/datoviz/drp2/enums.h:146.
DvzDrp2VertexStepMode · enum
enum DvzDrp2VertexStepMode {
DVZ_DRP2_VERTEX_STEP_MODE_VERTEX = 0,
DVZ_DRP2_VERTEX_STEP_MODE_INSTANCE = 1,
};
Declared in include/datoviz/drp2/enums.h:77.
DvzFormat · enum
enum DvzFormat {
DVZ_FORMAT_NONE = 0,
DVZ_FORMAT_R8_UNORM = 9,
DVZ_FORMAT_R8_SNORM = 10,
DVZ_FORMAT_R8_UINT = 13,
DVZ_FORMAT_R8_SINT = 14,
DVZ_FORMAT_R8G8_UNORM = 16,
DVZ_FORMAT_R8G8_SNORM = 17,
DVZ_FORMAT_R8G8_UINT = 20,
DVZ_FORMAT_R8G8_SINT = 21,
DVZ_FORMAT_R8G8B8_UNORM = 23,
DVZ_FORMAT_R8G8B8_SNORM = 24,
DVZ_FORMAT_R8G8B8_UINT = 27,
DVZ_FORMAT_R8G8B8_SINT = 28,
DVZ_FORMAT_R8G8B8A8_UNORM = 37,
DVZ_FORMAT_R8G8B8A8_SNORM = 38,
DVZ_FORMAT_R8G8B8A8_UINT = 41,
DVZ_FORMAT_R8G8B8A8_SINT = 42,
DVZ_FORMAT_R8G8B8A8_SRGB = 43,
DVZ_FORMAT_B8G8R8A8_UNORM = 44,
DVZ_FORMAT_B8G8R8A8_SRGB = 50,
DVZ_FORMAT_R16_UNORM = 70,
DVZ_FORMAT_R16_SNORM = 71,
DVZ_FORMAT_R16_UINT = 74,
DVZ_FORMAT_R16_SINT = 75,
DVZ_FORMAT_R16_SFLOAT = 76,
DVZ_FORMAT_R16G16B16A16_UNORM = 91,
DVZ_FORMAT_R16G16B16A16_SNORM = 92,
DVZ_FORMAT_R16G16B16A16_UINT = 95,
DVZ_FORMAT_R16G16B16A16_SINT = 96,
DVZ_FORMAT_R16G16B16A16_SFLOAT = 97,
DVZ_FORMAT_R32_UINT = 98,
DVZ_FORMAT_R32_SINT = 99,
DVZ_FORMAT_R32_SFLOAT = 100,
DVZ_FORMAT_R32G32_UINT = 101,
DVZ_FORMAT_R32G32_SINT = 102,
DVZ_FORMAT_R32G32_SFLOAT = 103,
DVZ_FORMAT_R32G32B32_UINT = 104,
DVZ_FORMAT_R32G32B32_SINT = 105,
DVZ_FORMAT_R32G32B32_SFLOAT = 106,
DVZ_FORMAT_R32G32B32A32_UINT = 107,
DVZ_FORMAT_R32G32B32A32_SINT = 108,
DVZ_FORMAT_R32G32B32A32_SFLOAT = 109,
DVZ_FORMAT_R64_UINT = 110,
DVZ_FORMAT_R64_SINT = 111,
DVZ_FORMAT_R64_SFLOAT = 112,
DVZ_FORMAT_R64G64_UINT = 113,
DVZ_FORMAT_R64G64_SINT = 114,
DVZ_FORMAT_R64G64_SFLOAT = 115,
DVZ_FORMAT_R64G64B64_UINT = 116,
DVZ_FORMAT_R64G64B64_SINT = 117,
DVZ_FORMAT_R64G64B64_SFLOAT = 118,
DVZ_FORMAT_R64G64B64A64_UINT = 119,
DVZ_FORMAT_R64G64B64A64_SINT = 120,
DVZ_FORMAT_R64G64B64A64_SFLOAT = 121,
DVZ_FORMAT_D16_UNORM = 124,
DVZ_FORMAT_X8_D24_UNORM_PACK32 = 125,
DVZ_FORMAT_D32_SFLOAT = 126,
DVZ_FORMAT_D16_UNORM_S8_UINT = 128,
DVZ_FORMAT_D24_UNORM_S8_UINT = 129,
DVZ_FORMAT_D32_SFLOAT_S8_UINT = 130,
};
Declared in include/datoviz/render_types.h:22.
DvzFrontFace · enum
enum DvzFrontFace {
DVZ_FRONT_FACE_COUNTER_CLOCKWISE = 0,
DVZ_FRONT_FACE_CLOCKWISE = 1,
};
Declared in include/datoviz/render_types.h:119.
DvzPrimitiveTopology · enum
enum DvzPrimitiveTopology {
DVZ_PRIMITIVE_TOPOLOGY_POINT_LIST = 0,
DVZ_PRIMITIVE_TOPOLOGY_LINE_LIST = 1,
DVZ_PRIMITIVE_TOPOLOGY_LINE_STRIP = 2,
DVZ_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST = 3,
DVZ_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP = 4,
DVZ_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN = 5,
};
Declared in include/datoviz/render_types.h:91.
Packets¶
Functions
dvz_drp2_packet_command_kind()¶
Return the default packet phase for a command type.
DvzDrp2PacketKind dvz_drp2_packet_command_kind(
DvzDrp2CommandType type
);
| Field | Type | Description |
|---|---|---|
| return | DvzDrp2PacketKind |
the packet phase, or DVZ_DRP2_PACKET_NONE for unsupported/unknown commands |
type |
DvzDrp2CommandType |
the command type |
Declared in include/datoviz/drp2/packet.h:69.
dvz_drp2_packet_decode_stream()¶
Decode a binary packet plus payload arena into a DRP2 command stream.
The returned command stream is owned by the caller and must be destroyed with
dvz_drp2_stream_destroy(). The payload arena must remain alive while the decoded stream is used.
DvzDrp2CommandStream * dvz_drp2_packet_decode_stream(
const void * packet,
uint64_t packet_size,
const void * arena,
uint64_t arena_size,
DvzDrp2PacketInfo * info
);
| Field | Type | Description |
|---|---|---|
| return | DvzDrp2CommandStream * |
a decoded command stream, or NULL when validation fails |
packet |
const void * |
encoded packet bytes |
packet_size |
uint64_t |
encoded packet byte size |
arena |
const void * |
payload arena bytes, or NULL when empty |
arena_size |
uint64_t |
payload arena byte size |
info |
DvzDrp2PacketInfo * |
optional output packet metadata |
Declared in include/datoviz/drp2/packet.h:129.
dvz_drp2_packet_destroy()¶
Destroy a buffer returned by dvz_drp2_packet_encode_stream().
void dvz_drp2_packet_destroy(
void * ptr
);
| Field | Type | Description |
|---|---|---|
ptr |
void * |
encoded packet or arena pointer |
Declared in include/datoviz/drp2/packet.h:139.
dvz_drp2_packet_encode_stream()¶
Encode a DRP2 command stream as a binary packet plus payload arena.
The returned packet and arena buffers are owned by the caller and must be released with
dvz_drp2_packet_destroy(). JSON/base64-only payload commands are intentionally rejected; the
runtime packet path requires raw payload bytes.
_Bool dvz_drp2_packet_encode_stream(
const DvzDrp2CommandStream * stream,
DvzDrp2PacketKind kind,
uint64_t resource_version,
uint64_t frame_index,
void ** packet,
uint64_t * packet_size,
void ** arena,
uint64_t * arena_size
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the stream was encoded |
stream |
const DvzDrp2CommandStream * |
the command stream |
kind |
DvzDrp2PacketKind |
the packet phase |
resource_version |
uint64_t |
retained resource version associated with the packet |
frame_index |
uint64_t |
frame counter associated with the packet |
packet |
void ** |
output encoded packet bytes, or NULL when empty |
packet_size |
uint64_t * |
output encoded packet byte size |
arena |
void ** |
output payload arena bytes, or NULL when empty |
arena_size |
uint64_t * |
output payload arena byte size |
Declared in include/datoviz/drp2/packet.h:110.
dvz_drp2_packet_encode_stream_phase()¶
Encode only commands whose default phase matches kind.
This is the native split-packet bridge used before browser execution is changed. Empty phases return true with NULL packet and zero sizes.
_Bool dvz_drp2_packet_encode_stream_phase(
const DvzDrp2CommandStream * stream,
DvzDrp2PacketKind kind,
uint64_t resource_version,
uint64_t frame_index,
void ** packet,
uint64_t * packet_size,
void ** arena,
uint64_t * arena_size
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the matching commands were encoded |
stream |
const DvzDrp2CommandStream * |
the command stream |
kind |
DvzDrp2PacketKind |
the packet phase to select and write into the packet header |
resource_version |
uint64_t |
retained resource version associated with the packet |
frame_index |
uint64_t |
frame counter associated with the packet |
packet |
void ** |
output encoded packet bytes, or NULL when the phase is empty |
packet_size |
uint64_t * |
output encoded packet byte size |
arena |
void ** |
output payload arena bytes, or NULL when empty |
arena_size |
uint64_t * |
output payload arena byte size |
Declared in include/datoviz/drp2/packet.h:88.
Types
DvzDrp2PacketInfo · record
struct DvzDrp2PacketInfo {
DvzDrp2PacketKind kind;
uint32_t command_count;
uint64_t command_bytes;
uint64_t arena_size;
uint64_t resource_version;
uint64_t frame_index;
};
Declared in include/datoviz/drp2/packet.h:47.
DvzDrp2PacketKind · enum
enum DvzDrp2PacketKind {
DVZ_DRP2_PACKET_NONE = 0,
DVZ_DRP2_PACKET_SETUP = 1,
DVZ_DRP2_PACKET_UPDATE = 2,
DVZ_DRP2_PACKET_FRAME = 3,
};
Declared in include/datoviz/drp2/packet.h:33.
Recording And Replay¶
Functions
dvz_drp2_recorder_close()¶
Close a linear DRP2 recorder.
This flushes metadata and destroys the recorder even when finalization fails.
_Bool dvz_drp2_recorder_close(
DvzDrp2Recorder * recorder
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether final metadata was written and all files closed cleanly |
recorder |
DvzDrp2Recorder * |
recorder to close, or NULL |
Declared in include/datoviz/drp2/recording.h:103.
dvz_drp2_recorder_open()¶
Open a linear DRP2 recorder.
DvzDrp2Recorder * dvz_drp2_recorder_open(
const char * path,
const DvzDrp2RecordingInfo * info
);
| Field | Type | Description |
|---|---|---|
| return | DvzDrp2Recorder * |
a newly allocated recorder, or NULL on error |
path |
const char * |
recording directory path |
info |
const DvzDrp2RecordingInfo * |
optional recording metadata copied by the recorder, or NULL for defaults |
Declared in include/datoviz/drp2/recording.h:80.
dvz_drp2_recorder_write_stream()¶
Append one timestamped command stream to a linear DRP2 recorder.
_Bool dvz_drp2_recorder_write_stream(
DvzDrp2Recorder * recorder,
double t_present,
const DvzDrp2CommandStream * stream
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the stream was appended |
recorder |
DvzDrp2Recorder * |
the recorder |
t_present |
double |
presentation timestamp in seconds relative to recording start |
stream |
const DvzDrp2CommandStream * |
the command stream to append |
Declared in include/datoviz/drp2/recording.h:91.
dvz_drp2_recording_close()¶
Close a loaded DRP2 recording.
void dvz_drp2_recording_close(
DvzDrp2Recording * recording
);
| Field | Type | Description |
|---|---|---|
recording |
DvzDrp2Recording * |
loaded recording, or NULL |
Declared in include/datoviz/drp2/recording.h:135.
dvz_drp2_recording_execute_all()¶
Execute all recorded frames in order against an existing DRP2 runtime.
DvzDrp2ValidationResult dvz_drp2_recording_execute_all(
const DvzDrp2Recording * recording,
DvzDrp2Runtime * runtime
);
| Field | Type | Description |
|---|---|---|
| return | DvzDrp2ValidationResult |
the first failing validation result, or OK after all frames execute |
recording |
const DvzDrp2Recording * |
loaded recording |
runtime |
DvzDrp2Runtime * |
the runtime |
Declared in include/datoviz/drp2/recording.h:202.
dvz_drp2_recording_execute_frame()¶
Execute one recorded frame against an existing DRP2 runtime.
DvzDrp2ValidationResult dvz_drp2_recording_execute_frame(
const DvzDrp2Recording * recording,
DvzDrp2Runtime * runtime,
uint32_t frame_index
);
| Field | Type | Description |
|---|---|---|
| return | DvzDrp2ValidationResult |
the validation result after frame execution |
recording |
const DvzDrp2Recording * |
loaded recording |
runtime |
DvzDrp2Runtime * |
the runtime |
frame_index |
uint32_t |
frame index |
Declared in include/datoviz/drp2/recording.h:190.
dvz_drp2_recording_frame()¶
Return one frame record from a loaded recording.
const DvzDrp2RecordedFrame * dvz_drp2_recording_frame(
const DvzDrp2Recording * recording,
uint32_t frame_index
);
| Field | Type | Description |
|---|---|---|
| return | const DvzDrp2RecordedFrame * |
the frame record, valid until the recording is closed, or NULL |
recording |
const DvzDrp2Recording * |
loaded recording |
frame_index |
uint32_t |
frame index |
Declared in include/datoviz/drp2/recording.h:165.
dvz_drp2_recording_frame_count()¶
Return the number of frame records in a loaded recording.
uint32_t dvz_drp2_recording_frame_count(
const DvzDrp2Recording * recording
);
| Field | Type | Description |
|---|---|---|
| return | uint32_t |
the frame count |
recording |
const DvzDrp2Recording * |
loaded recording |
Declared in include/datoviz/drp2/recording.h:154.
dvz_drp2_recording_frame_stream()¶
Return a newly allocated command stream for one recorded frame.
Payload bytes in the returned stream are copied and remain valid after the recording is closed.
DvzDrp2CommandStream * dvz_drp2_recording_frame_stream(
const DvzDrp2Recording * recording,
uint32_t frame_index
);
| Field | Type | Description |
|---|---|---|
| return | DvzDrp2CommandStream * |
a newly allocated frame command stream that the caller must destroy with dvz_drp2_stream_destroy(), or NULL |
recording |
const DvzDrp2Recording * |
loaded recording |
frame_index |
uint32_t |
frame index |
Declared in include/datoviz/drp2/recording.h:179.
dvz_drp2_recording_info()¶
Return a default DRP2 recording info descriptor.
DvzDrp2RecordingInfo dvz_drp2_recording_info(void);
| Field | Type | Description |
|---|---|---|
| return | DvzDrp2RecordingInfo |
zeroed recording info with a valid ABI prologue |
Declared in include/datoviz/drp2/recording.h:69.
dvz_drp2_recording_open()¶
Open a linear DRP2 recording directory for indexed playback.
DvzDrp2Recording * dvz_drp2_recording_open(
const char * path
);
| Field | Type | Description |
|---|---|---|
| return | DvzDrp2Recording * |
the loaded recording, or NULL on error |
path |
const char * |
recording directory path |
Declared in include/datoviz/drp2/recording.h:127.
dvz_drp2_recording_playback()¶
Play a recording frame by frame, optionally pacing execution by recorded timestamps.
DvzDrp2ValidationResult dvz_drp2_recording_playback(
const DvzDrp2Recording * recording,
DvzDrp2Runtime * runtime,
_Bool paced
);
| Field | Type | Description |
|---|---|---|
| return | DvzDrp2ValidationResult |
the first failing validation result, or OK after playback completes |
recording |
const DvzDrp2Recording * |
loaded recording |
runtime |
DvzDrp2Runtime * |
the runtime |
paced |
_Bool |
whether to wait for each frame timestamp before execution |
Declared in include/datoviz/drp2/recording.h:213.
dvz_drp2_recording_read_stream()¶
Read a linear DRP2 recording directory.
DvzDrp2CommandStream * dvz_drp2_recording_read_stream(
const char * path
);
| Field | Type | Description |
|---|---|---|
| return | DvzDrp2CommandStream * |
a reconstructed command stream that the caller must destroy with dvz_drp2_stream_destroy(), or NULL on error |
path |
const char * |
recording directory path |
Declared in include/datoviz/drp2/recording.h:224.
dvz_drp2_recording_stream()¶
Return the full reconstructed command stream owned by a loaded recording.
const DvzDrp2CommandStream * dvz_drp2_recording_stream(
const DvzDrp2Recording * recording
);
| Field | Type | Description |
|---|---|---|
| return | const DvzDrp2CommandStream * |
the full command stream, valid until the recording is closed |
recording |
const DvzDrp2Recording * |
loaded recording |
Declared in include/datoviz/drp2/recording.h:145.
dvz_drp2_recording_write_stream()¶
Write a linear DRP2 recording directory.
Supported MVP commands are stored as portable JSON records with payload bytes in blobs. Unsupported commands fall back to ABI-local raw command blobs for development replay.
_Bool dvz_drp2_recording_write_stream(
const char * path,
const DvzDrp2CommandStream * stream,
const DvzDrp2RecordingInfo * info
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the recording was written |
path |
const char * |
recording directory path |
stream |
const DvzDrp2CommandStream * |
the command stream to record |
info |
const DvzDrp2RecordingInfo * |
optional recording metadata copied for the write, or NULL for defaults |
Declared in include/datoviz/drp2/recording.h:117.
Types
DvzDrp2RecordedFrame · record
struct DvzDrp2RecordedFrame {
double t_present;
uint32_t first_command;
uint32_t command_count;
};
Declared in include/datoviz/drp2/recording.h:52.
DvzDrp2Recorder · typedef
typedef struct DvzDrp2Recorder DvzDrp2Recorder;
Declared in include/datoviz/drp2/recording.h:37.
DvzDrp2Recording · typedef
typedef struct DvzDrp2Recording DvzDrp2Recording;
Declared in include/datoviz/drp2/recording.h:35.
DvzDrp2RecordingInfo · record
struct DvzDrp2RecordingInfo {
uint32_t struct_size;
uint32_t flags;
uint32_t width;
uint32_t height;
double duration_s;
double t_present;
double fps_cap;
const char * backend_hint;
};
Declared in include/datoviz/drp2/recording.h:39.
Runtime Integration¶
Functions
dvz_drp2_external_buffer_desc()¶
Return a default external-buffer descriptor.
DvzDrp2ExternalBufferDesc dvz_drp2_external_buffer_desc(void);
| Field | Type | Description |
|---|---|---|
| return | DvzDrp2ExternalBufferDesc |
zeroed descriptor with a valid ABI prologue |
Declared in include/datoviz/drp2/runtime.h:92.
dvz_drp2_runtime_attach_frame_target()¶
Attach a borrowed stream frame as a runtime render target.
The runtime retains the frame's borrowed image, image-view, and command-buffer handles under
texture_id. They must remain valid until this target is replaced, the runtime is reset, or the
runtime is destroyed. The command buffer must already be recording during subsequent execution;
the runtime records into it but does not begin, end, reset, submit, or destroy it.
_Bool dvz_drp2_runtime_attach_frame_target(
DvzDrp2Runtime * runtime,
uint64_t texture_id,
const DvzStreamFrame * frame
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the frame target was attached |
runtime |
DvzDrp2Runtime * |
the runtime |
texture_id |
uint64_t |
the DRP2 texture id to expose for render passes |
frame |
const DvzStreamFrame * |
the borrowed stream frame whose command buffer is currently recording |
Declared in include/datoviz/drp2/runtime.h:196.
dvz_drp2_runtime_copy_texture_to_frame()¶
Record a copy from a runtime-owned texture into a borrowed stream frame.
The destination frame must declare DVZ_STREAM_FRAME_USAGE_COPY_DST, and its command buffer must
already be recording. This call records into the borrowed command buffer without ending,
submitting, resetting, or destroying it.
_Bool dvz_drp2_runtime_copy_texture_to_frame(
DvzDrp2Runtime * runtime,
uint64_t texture_id,
const DvzStreamFrame * frame
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
whether the copy commands were recorded |
runtime |
DvzDrp2Runtime * |
the runtime |
texture_id |
uint64_t |
the DRP2 texture id to copy from |
frame |
const DvzStreamFrame * |
the borrowed stream frame whose command buffer is currently recording |
Declared in include/datoviz/drp2/runtime.h:212.
dvz_drp2_runtime_destroy()¶
Destroy a DRP2 runtime.
Vklite-backed runtimes wait for submitted device work before releasing owned backend resources.
void dvz_drp2_runtime_destroy(
DvzDrp2Runtime * runtime
);
| Field | Type | Description |
|---|---|---|
runtime |
DvzDrp2Runtime * |
the runtime |
Declared in include/datoviz/drp2/runtime.h:127.
dvz_drp2_runtime_download_buffer()¶
Download bytes from a DRP2 buffer into CPU memory.
Must be called after dvz_drp2_runtime_execute() has completed. The requested byte range must fit
in a live buffer created with DVZ_DRP2_BUFFER_USAGE_MAP_READ.
_Bool dvz_drp2_runtime_download_buffer(
DvzDrp2Runtime * runtime,
uint64_t buffer_id,
uint64_t offset,
uint64_t size,
void * dst
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
true when the live buffer and byte range are valid and the bytes were copied |
runtime |
DvzDrp2Runtime * |
the vklite runtime |
buffer_id |
uint64_t |
the DRP2 buffer id used in the stream |
offset |
uint64_t |
byte offset within the buffer |
size |
uint64_t |
number of bytes to read |
dst |
void * |
destination CPU buffer (caller-allocated, at least size bytes) |
Declared in include/datoviz/drp2/runtime.h:229.
dvz_drp2_runtime_execute()¶
Execute a command stream through a DRP2 runtime skeleton.
DvzDrp2ValidationResult dvz_drp2_runtime_execute(
DvzDrp2Runtime * runtime,
const DvzDrp2CommandStream * stream
);
| Field | Type | Description |
|---|---|---|
| return | DvzDrp2ValidationResult |
the semantic-validation result for semantic-only runtimes, otherwise the backend execution result; ok is false when either stage fails |
runtime |
DvzDrp2Runtime * |
the runtime |
stream |
const DvzDrp2CommandStream * |
the command stream |
Declared in include/datoviz/drp2/runtime.h:180.
dvz_drp2_runtime_get_config()¶
Return the borrowed configuration that was used to create a DRP2 runtime.
DvzDrp2RuntimeConfig dvz_drp2_runtime_get_config(
const DvzDrp2Runtime * runtime
);
| Field | Type | Description |
|---|---|---|
| return | DvzDrp2RuntimeConfig |
the runtime configuration, or zero-initialized fields when runtime is NULL |
runtime |
const DvzDrp2Runtime * |
the runtime, or NULL |
Declared in include/datoviz/drp2/runtime.h:116.
dvz_drp2_runtime_register_external_buffer()¶
Register a runtime-provided buffer under a DRP2 buffer id.
The registration is live-runtime state and is not portable DRP2 stream data. Semantic-only
runtimes use size and usage without requiring a backend buffer. Vklite-backed runtimes borrow
desc->buffer; the caller must keep it alive until the runtime is reset or destroyed.
_Bool dvz_drp2_runtime_register_external_buffer(
DvzDrp2Runtime * runtime,
uint64_t buffer_id,
const DvzDrp2ExternalBufferDesc * desc
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
true on success |
runtime |
DvzDrp2Runtime * |
the runtime |
buffer_id |
uint64_t |
the DRP2 buffer id to register |
desc |
const DvzDrp2ExternalBufferDesc * |
the external buffer descriptor |
Declared in include/datoviz/drp2/runtime.h:155.
dvz_drp2_runtime_reset()¶
Reset a DRP2 runtime to an empty semantic and backend state.
This releases runtime-owned objects while keeping the runtime itself and its borrowed device/allocator configuration alive for reuse. Vklite-backed runtimes wait for submitted device work before releasing owned backend resources.
void dvz_drp2_runtime_reset(
DvzDrp2Runtime * runtime
);
| Field | Type | Description |
|---|---|---|
runtime |
DvzDrp2Runtime * |
the runtime |
Declared in include/datoviz/drp2/runtime.h:140.
dvz_drp2_runtime_vklite()¶
Create a DRP2 runtime using the vklite backend boundary.
The runtime copies the configuration but borrows its device and allocator. Both must remain live until the runtime is destroyed. A configuration with both pointers NULL creates a semantic-only runtime that validates streams without executing backend commands.
DvzDrp2Runtime * dvz_drp2_runtime_vklite(
const DvzDrp2RuntimeConfig * cfg
);
| Field | Type | Description |
|---|---|---|
| return | DvzDrp2Runtime * |
a newly allocated runtime, or NULL on invalid configuration or allocation failure |
cfg |
const DvzDrp2RuntimeConfig * |
required runtime configuration |
Declared in include/datoviz/drp2/runtime.h:106.
dvz_drp2_runtime_vklite_config()¶
Return a DRP2 runtime configuration for a vklite-backed runtime.
DvzDrp2RuntimeConfig dvz_drp2_runtime_vklite_config(
DvzDevice * device,
DvzVma * allocator
);
| Field | Type | Description |
|---|---|---|
| return | DvzDrp2RuntimeConfig |
the runtime configuration |
device |
DvzDevice * |
the borrowed Vulkan device wrapper |
allocator |
DvzVma * |
the borrowed Vulkan allocator wrapper |
Declared in include/datoviz/drp2/runtime.h:84.
Types
DvzDrp2ExternalBufferDesc · record
struct DvzDrp2ExternalBufferDesc {
uint32_t struct_size;
uint32_t flags;
DvzBuffer * buffer;
uint64_t size;
uint32_t usage;
};
Declared in include/datoviz/drp2/runtime.h:61.
DvzDrp2Runtime · typedef
typedef struct DvzDrp2Runtime DvzDrp2Runtime;
Declared in include/datoviz/drp2/types.h.
DvzDrp2RuntimeConfig · record
struct DvzDrp2RuntimeConfig {
uint32_t struct_size;
uint32_t flags;
DvzDevice * device;
DvzVma * allocator;
_Bool semantic_only;
};
Declared in include/datoviz/drp2/runtime.h:51.
DvzDrp2ValidationCode · enum
enum DvzDrp2ValidationCode {
DVZ_DRP2_VALIDATION_OK = 0,
DVZ_DRP2_VALIDATION_INVALID_ARGUMENT = 1,
DVZ_DRP2_VALIDATION_INVALID_STATE = 2,
DVZ_DRP2_VALIDATION_OUT_OF_RANGE = 3,
DVZ_DRP2_VALIDATION_USAGE = 4,
};
Declared in include/datoviz/drp2/enums.h:184.
DvzDrp2ValidationResult · record
struct DvzDrp2ValidationResult {
_Bool ok;
DvzDrp2ValidationCode code;
uint32_t command_index;
};
Declared in include/datoviz/drp2/runtime.h:42.
DvzVma · typedef
typedef struct DvzVma DvzVma;
Declared in include/datoviz/drp2/runtime.h:39.