runtime_lane::render_merged_attributes: stage_in states' executions run on the GPU alone

The lane test of executions whose inherited state's vertex function reads [[stage_in]]
attributes now states the GPU form, against the host step's pixels (a barrier the CPU set and
cleared), for a kernel-written ICB of triangle draws and indexed draws (merged) and triangle
strips (one draw per command), each command binding its own positions and per-instance marks at
its own offsets, first/base vertex and base instance:

- pulled_attributes_of_executed_draws_fetch_their_commands_elements: strides 10 and 6, which the
  shader fetches anyway (merged draws read the command's vertex and instance, not the merged
  draw's corner indices);
- fixed_function_layouts_of_executed_draws_are_pulled: strides 8 and 4, marks at step rates 1
  and 2, no vertex buffer bound at the encoder;
- a_layout_of_a_stride_set_per_bind_keeps_the_host_step: a dynamic-stride position layout the
  commands bind at their own stride takes the host step, whose notice names the rule.

The fixture gains ima_strips (a triangle strip writer). docs/API.md states the attribute rule in
the indirect command buffer section and in the GPU form's list; api_signatures.tsv and
api_surface.rs list draw_replay_vertex_layouts.
This commit is contained in:
Anees Iqbal committed 2026-11-12 08:37:43 -08:00
1 parent fa36bcc433
commit 7cd885ea5b
7 files changed
+561 -340

No files matched your search

+9 -2
View File
@@ -1563,7 +1563,12 @@ the device has it (`replay_preprocess_generated`). Draws of primitives under the
pipeline replay on the device through `draw_replay_preprocess`: one indirect draw per command
and primitive type the execution names, the pipeline compiled as its replay variant
(`VariantKey::replay_bindings`), whose vertex and fragment functions read each command's buffers
from the slot tables the preprocess writes. Draws of one list type or points whose fragment function
from the slot tables the preprocess writes. The variant pulls every layout fixed-function vertex
input would fetch (`draw_replay_vertex_layouts`, named in the shape's `far_vertex_buffers`: the
pulled-vertex-buffer variant, no buffer bound there), so each attribute reads its command's buffer
at the command's own vertex and instance; a layout whose stride is set per bind keeps an
execution off the device (`DrawReplayRule::VertexAttributes`), since each command binds its own
stride. Draws of one list type or points whose fragment function
reads no buffer and no `[[primitive_id]]` may instead merge into one draw (`DrawReplay::merged`):
two merge passes (`draw_merge_module`) write each command's first vertex in the merged draw, and
the vertex function, compiled as its merged variant (`VariantKey::merged_draws`), finds its
@@ -4838,7 +4843,9 @@ each item named states the rule in full.
- **Render commands the GPU may write run on the GPU alone** where the commit can tell from what
the records may hold (`IndirectCommandBuffer::command_writes`) that every command is a draw of one
primitive type under the encoder's pipeline state, which the buffer inherits with none of its
buffers: one indirect draw per command, in order, from what a preprocess wrote; and where the
buffers, and whose vertex function fetches no attribute of a layout whose stride is set per bind
(the commands bind their own buffers, which the GPU form fetches each attribute from in the
shader): one indirect draw per command, in order, from what a preprocess wrote; and where the
commands draw points, lines or triangles, the state's vertex function writes no memory and its
fragment function reads no buffer and no `[[primitive_id]]`, one merged draw for the whole range,
in the commands' order, whatever its count (`WorkCounts::merged_draw_commands`). Otherwise, and