Skip to content

P3-4: Coalesce trailing closing barrier into segment end and elide bare opening buffer-blit barrier - #7

Merged
Apdelrahman1911 merged 2 commits into
x86simfrom
perf/p3-4-barrier-coalescing
Dec 6, 2026
Merged

Apdelrahman1911 merged 2 commits into
x86simfrom
perf/p3-4-barrier-coalescing

Conversation

@Apdelrahman1911

Copy link
Copy Markdown

Implements Investigation 33 P3-4A + P3-4B:

  • P3-4A (): When no texture-over-buffer copy-backs are owed (back.is_empty()), coalesces any deferred trailing closing barrier (self.closing from a trailing render pass or blit) directly into record::end()'s single ALL_COMMANDS barrier via joined(). Eliminates one redundant full-pipeline ALL_COMMANDS barrier on every command buffer / segment ending with a pass or blit while preserving record::end()'s cross-CB ordering invariant (required by submit.rs batching up to 16 CBs into one VkSubmitInfo2).
  • P3-4B (): Passes bare = !opens on the four buffer-only building.lead(command, &[], ...) sites (copy_from_buffer_to_buffer, fill_buffer, reset_commands_in_buffer, read_back_range) when opening a fresh command buffer with no prior commands, managed copy-backs, heap aliases, or over-copies, matching render_encoder.rs.
  • Tests: Updated exact barrier-count expectations in tests/pass.rs, tests/blit.rs, tests/draw.rs, tests/present.rs, and tests/mipmaps.rs.

@Apdelrahman1911
Apdelrahman1911 merged commit 19f2384 into x86sim Dec 6, 2026
1 of 3 checks passed
@Apdelrahman1911
Apdelrahman1911 deleted the perf/p3-4-barrier-coalescing branch December 6, 2026 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant