Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

validation complains about inefficient srcStageMask usage of VK_PIPELINE_STAGE_ALL_COMMANDS_BIT #743

Closed
Tracked by #742
w23 opened this issue Nov 26, 2024 · 1 comment
Assignees
Labels
dev-tools Tools helpful for development enhancement New feature or request performance Performance improvement needed refactoring Improvement of the code base regression What worked but was broken

Comments

@w23
Copy link
Owner

w23 commented Nov 26, 2024

As of #742 validation produces these messages every frame:
Validation Warning: [ BestPractices-pipeline-stage-flags-compute ] Object 0: handle = 0x17840027090, name = cmdbuf[1], type = VK_OBJECT_TYPE_COMMAND_BUFFER; | MessageID = 0xf997c4f2 | vkCmdPipelineBarrier(): srcStageMask using VK_PIPELINE_STAGE_ALL_COMMANDS_BIT

My current understanding is that it is due to this line

VK_PIPELINE_STAGE_ALL_COMMANDS_BIT,
as this is the only user of said flag.

To resolve this we need to properly track buffer (and their subranges) states.

@w23 w23 added enhancement New feature or request performance Performance improvement needed regression What worked but was broken dev-tools Tools helpful for development refactoring Improvement of the code base labels Nov 26, 2024
@w23 w23 self-assigned this Nov 26, 2024
@w23 w23 mentioned this issue Nov 26, 2024
26 tasks
w23 added a commit that referenced this issue Nov 26, 2024
w23 added a commit that referenced this issue Dec 10, 2024
Update TODO with latest state.

Fixup staging write-after-write buffer tracking.

Fixes #743 -- was fixed a couple of commits ago.
@w23
Copy link
Owner Author

w23 commented Dec 11, 2024

Fixed for now with more granular semaphore stages.
The opportunity to forego semaphores completely and replace with even more granular barriers still remains.

@w23 w23 closed this as completed Dec 11, 2024
w23 added a commit that referenced this issue Dec 19, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Implements new totally automatic barrier placement. Also, staging is refactored.

- [x] image staging
  - [x] some images are corrupted
  - ~~[ ] #745~~ -- postponed until next time we'd need to touch images; current code works good enough for now.
  - [x] use combuf auto barriers everywhere where it makes sense
- [x] corrupted geometry in playdemo ...
- [x] buffer staging
  - [x] #743 
  - [x] track copied staging regions: i.e. staging must know that it has been drained fully
- [x] RT-trad dynamic toggle
  - [x] push-pull staging boundary
- [x] frame dependency tracking: automatically free/flip buffers when frame using them is done
- [x] replace ALL barriers with combuf ones
  - [x] buffers in rtx/resources
  - [x] images
    - [x] track images sync state inline where possible
  - [x] find other uses
- [x] improve staging
  - [x] track staging users explicitly
    - [x] per-user stats: sizes, allocations, etc
    - [x] push remaining data for stale users
  - [x] use ring buffer directly, track frame boundaries externally in fctl
- [x] crash in `buildBlases()`:
  1. load map with rt disabled
  2. change to another map
  3. enable rt
  4. 💥
- [x] suboptimal barrier, see comment #742 (comment)
- [x] simplify creating and building TLAS
- [x] Run rendering tests
  - [x] missing emissive toxic waters
    - Leave as a known problem: it's due to inadvertently skipping some water surfaces when looking for emissive ones, see:
      - #56
      - #752
  - [x] slightly different indirect blur
    - Assuming that this is due to Á-Trous filtering, which could've sneaked through before the gold images were set. Not going to investigate, as we're about to submit a big change to the denoiser.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev-tools Tools helpful for development enhancement New feature or request performance Performance improvement needed refactoring Improvement of the code base regression What worked but was broken
Projects
None yet
Development

No branches or pull requests

1 participant