Skip to content

perf(runtime): feedback-hinted pass opening (P3-1) and lazy initial texture clear elision (P3-3) - #6

Merged
Apdelrahman1911 merged 2 commits into
x86simfrom
perf/p3-feedback-hint-and-lazy-clears
Dec 6, 2026
Merged

Apdelrahman1911 merged 2 commits into
x86simfrom
perf/p3-feedback-hint-and-lazy-clears

Conversation

@Apdelrahman1911

@Apdelrahman1911 Apdelrahman1911 commented Dec 6, 2026 •

Copy link
Copy Markdown

Summary

  • P3-1 (Image.feedback_hint): Sticky hint recorded in RenderCommandEncoder::feedback_moves() so subsequent passes on single-mip/single-layer 2D non-storage color targets open directly in ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT with encoder.moved pre-seeded, eliminating ~5,500 mid-pass rendering_interrupts and other_barriers per 150s on Lavapipe while keeping ordered() intact after prior writes.
  • P3-3 (lazy texture_clears elision): Segment-0 full-extent Clear/DontCare passes on un-homed single-2D textures covering all aspects transition directly from UNDEFINED and register Gpu.first_overwrites; WorkState::close() / take_uploads() claims Image::claim_homed() and elides eager Upload::home clears (~2,400 clears / 260 MB / 1,450 texture_clear_barriers per 150s on Lavapipe), with zero hazard for dropped or reordered command buffers.
  • Tests: Added on-device Lavapipe tests every_device_reuses_feedback_layout_on_subsequent_passes_without_interrupt and every_device_elides_initial_texture_clear_when_first_pass_clears_whole_image, plus updated every_device_clears_loads_and_stores_a_depth_attachment_its_draws_do_not_test.

…upload clears on full-clear first passes (P3-3)

- P3-1: Add sticky Image.feedback_hint set in RenderCommandEncoder::feedback_moves(). On subsequent passes, single-mip/single-layer 2D non-storage color render targets with feedback_hint open directly in ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT and pre-seed encoder.moved, eliminating mid-pass vkCmdEndRendering + ALL_COMMANDS other_barriers + vkCmdBeginRendering(LOAD) (~5,500 interrupts/150s on Lavapipe).
- P3-3: Track segment-0 full-extent Clear/DontCare single-2D first overwrites in Gpu.first_overwrites and transition those targets directly from UNDEFINED at PassStartBarriers. WorkState::close/take_uploads skips eager Upload::home GPU zeroing clears when no earlier command in the batch references the image (~2,400 clears / ~260 MB / ~1,450 texture_clear_barriers per 150s on Lavapipe), preserving full safety for dropped or reordered command buffers and LoadAction::Load textures.
- Add Lavapipe device tests for both P3-1 and P3-3 and update draw_depth barrier count.
@Apdelrahman1911
Apdelrahman1911 merged commit 19018b2 into x86sim Dec 6, 2026
1 of 3 checks passed
@Apdelrahman1911
Apdelrahman1911 deleted the perf/p3-feedback-hint-and-lazy-clears branch December 6, 2026 12:27
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