Conversation
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 does fix a bunch of emissive water surfaces missing, but not all. It also entangles the code even more. Not sure if its worth it, maybe a better approach is possible.
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.
Not yet tested, due to apparent no overlap on this platform ;_;.
- Limit stack to 8. - Use stack limit to position GPU scopes beneath. - Tweak scope overlap code. Not tested -- currently no overlap produced. - Tweak scope label color to be a bit more readable.
These can be universally useful.
Speeds is Vulkan-unaware, so don't make it so. It just needs counter name and its value units.
Add rad files for blueshift and friends
This allows them being displayed as graphs.
Metrics will be referenceable by indexes in the next commit.
Use `r_speeds_mlist <filter>` or `r_speeds_mtable <filter>` to find the list of metrics with indexes. Use `r_speeds_graph add <index1> <index2> ...` to add graphs by metric index instead of lengthy name that is a pain to type.
Use `vk_speeds_counters` to list available counters. Use `vk_speeds_counters_enable <C1> <C2> ...` to enable specified counters by their index. If no counters are provided, disables perf query completely. KNOWN ISSUES: - sometimes validation still complains about misaligned performance lock -- it should be active before any of the command buffers with perf query start recording commands.
GitHub has deprecated windows-2019: actions/runner-images#12045
This greatly simplifies profiling lock management, as now the lock can be enabled at init time for the entire duration. Enabling it dynamically is messy due to global command buffer requirements, which are difficult to control in this code base.
Add detailed GPU performance counters based on VK_KHR_performance_query - [x] #499 - [x] Query and log available performance counters - [x] Create query pool with specified perf counters - [x] Cover eligible scopes with perf queries - [x] Control perf query using console commands - [x] Display perf counters with r_speeds Closes #499
Merge from current upstream
Decals are added in the same way as in the other renderers and in vanilla xash3d: as a list of decals attached to a BSP surface. They are rendered as polygons, similarly to the GL renderer. This makes the visuals as close to the original as possible and avoids the typical issues of deferred decals. In ray tracing, a decal changes the surface material, allowing it to interact with lighting and modify the surface roughness/metalness without affecting normals (optional). Changes: - Adapted the decal file from the GL renderer for the VK renderer - Added extra getters to existing files that are required for this feature - Added TRI_POLYGON mode to TriApi, which is required for decals - Added batching for decal geometry to reduce draw calls and improve memory storage efficiency Introduced the TRI_TRIANGLES geometry type specifically for batching - Added a render mode, material, and pipeline for decals - Added traceDecals, which applies material data from nearby decals to the ray's payload, allowing decals to be integrated into the ray tracing pipeline - Changed the transparency calculation order so that the decal modifies the surface material before lighting is evaluated in bounce.comp - Use r_speeds for decals stats: control total decals count and batched decal meshes count <img width="2879" height="1745" alt="image" src="https://github.com/user-attachments/assets/a23fb18f-a816-470c-b8db-d17b4209856e" /> Closes #107
This file contains hidden or 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
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.
This is here for now only for tracking mergeability + CI purposes