forked from FWGS/xash3d-fwgs
-
Notifications
You must be signed in to change notification settings - Fork 16
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
New staging #742
Merged
Merged
New staging #742
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Also add dynamic array (not used in this commit)
This is untested PoC quality. Staging regions are not tracked properly yet. Image upload commit is also done at a weird place.
fixes building on windows handles canceling holes still, corrupts some textures for some reason
Prior to this change `R_VkImageClear()` functtion was causing SYNC-HAZARD-WRITE-AFTER-READ error, thinking that clearing `[dest]` image is not synchronized with blit during the previous frame. However, there's an explicit semaphore sync with the previous frame, and as such it seems this validation complaint is baseless. I'd make a simple repro and submit it to validation repo, but who am i kidding, i have like 10 minutes left to do anything today, and i likely won't be able to get back to this in several days.
also add some notes about clangdb and staging problems
Apparently now it is possible to handle emissive brush surfaces at the same time as generating geometry. No second pass for emissive extraction is needed. This allows skipping extra `R_VkStagingFlushSync()`. Not all flush-sync usages are removed, though.
It's an incomplete intermediary change. This commit doesn't work. It compiles tho. Changes: - Move buffer staging tracking to vk_buffer - Sketch automatic buffer barriers tied to vk_combuf - Remove all combuf handling from staging. That was just gross. Breaks: - Everything. - RT AS building is commented out for now
it render quite a few traditional frames but then fails with cross-cmdbuf sync validation errors
- print out vkQueueSubmit with its semaphores - print out buffer barriers - print out when buffer copy submission happens - print various ref_vk initialization stages
Validation was complaining about odd SYNC-HAZARD-WRITE-AFTER-READ lack of buffer barrier at the very beginning of a frame, while I thought that command buffers are properly serialized by semaphores. Turns out, `VkSubmitInfo::pWaitDstStageMask` should accompany each wait semaphore with its corresponding stage. Properly setting TOP_OF_PIPE for the wait semaphore of a previous submission fixes the complaint.
This is likely no the right way to do this. Address this when focusing on correct gamma overall for traditional renderer. Currently this is here just to make it have some non-zero values early.
Previous 20.04 doesn't have the latest Vulkan SDK. Also print deps script commands verbosely for easier CI debugging.
Allows to remove a small pile of manual barriers yay.
It compiles, but it's broken and doesn't pass validation yet. Resource part doesn't collect barriers correctly somehow, needs debugging.
Now it works! Needs a bit of a cleanup, though.
This adds explicit staging user tracking, which allows: - tracking whether there are any unclaimed items, and pushing them (or ignoring, if the user decides so, for transient stuff) - having more granular stats for staging, i.e. which buffer/subsystem used staging in this frame, and how much (not implemented yet) This commit also changes staging from using flip buffer to just ring buffer allocator.
`staging.<USER>.size` and `staging.<USER>.allocs` r_speeds metrics are now available for every staging user.
Move draw_instance into ray_accel module. Then, when building TLAS, go through all instances, and check whether their blases need to be (re)built. Enqueue those who need to be rebuilt before building TLAS. Fixes crashing when doing changelevel w/o rt, and then enabling rt.
…rriers Group by access/stage, not by src/dst. Makes logs a bit more readable.
Previously we forced src image layout to be UNDEFINED if the image was to be written into. This lead to RADV driver to completely clear our so painfully constructed ray traced frame. The correct layout transition should probably be something like this: if we're not to _read_ from image contents, only then we can be sure that its contents are not needed anymore, and can be discarded by settind the src layout to UNDEFINED.
|
This makes c0a0d toxic pool emissive again, but it still doesn't make all known toxic water objects emissive.
This was a bug in validation layers, it's been fixed back in 2021.
Swapchain framebuffer image being in VK_IMAGE_LAYOUT_PRESENT_SRC_KHR layout has zero access flags, and is probably synced with bottom-of-pipe stage. At least this does please validation layers.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
[ ] invert vk_image upload api #745-- postponed until next time we'd need to touch images; current code works good enough for now.srcStageMask
usage ofVK_PIPELINE_STAGE_ALL_COMMANDS_BIT
#743buildBlases()
:!water
textures does not work #56