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

invert vk_image upload api #745

Open
w23 opened this issue Nov 27, 2024 · 0 comments
Open

invert vk_image upload api #745

w23 opened this issue Nov 27, 2024 · 0 comments
Labels
dev-tools Tools helpful for development enhancement New feature or request performance Performance improvement needed

Comments

@w23
Copy link
Owner

w23 commented Nov 27, 2024

Instead of the sequence of:

  • R_VkImageUploadBegin()
  • R_VkImageUploadSlice()
  • R_VkImageUploadSlice()
  • R_VkImageUploadSlice()
  • R_VkImageUploadEnd()

Do the reciprocal:

  • R_VkImageUploadLock() -> returns slices[] with pointers and stuff
  • for (i..) copy mips/layers/etc into slice[i]
  • R_VkImageUploadUnlock()

Why:

  • less upload/staging state tracking inside vk_image.c
  • fewer opportunities to mess things up, less checks needed
  • more opportunities to avoid excessive copying, e.g.: files could be loaded directly into GPU memory, w/o intermediary copies
@w23 w23 added enhancement New feature or request performance Performance improvement needed dev-tools Tools helpful for development labels Nov 27, 2024
@w23 w23 mentioned this issue Dec 11, 2024
26 tasks
w23 added a commit that referenced this issue Dec 19, 2024
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
Projects
None yet
Development

No branches or pull requests

1 participant