Port built-in shaders to dxbc-spv IR#5531
Merged
Conversation
Contributor
If by cursed you mean 16-bit, then yes, I've had complaints of black screens during intro playback on MSAA swapchains and the like from people using D7VK on radv, though the same path seems workable on both Nvidia and Intel. Otherwise, I'll happily take more |
Owner
Author
|
Well, guess that's another thing for the todo list then. |
Checking the flag doesn't work here because the flag can change between barriers. Always transitioning all 3D slices is safe here though.
Intended to replace the majority of our built-in GLSL shaders.
Also properly support bit-wise stencil resolves on Nvidia.
Array views are no longer required for the blit shader.
6a6d3da to
9a5c59e
Compare
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.
Based on #5528, hence the draft (but also because there's some minor cleanups to be done).
Not really something I had planned on doing, but the tiler experiments revealed some issues with the old code, specifically, low launch rate on AMD hardware due to everything reading
gl_Layerorgl_FragCoord.xy(yeah apparently they managed to make that slow), which does actually cause a nontrivial amount of overhead when there are lots of blits or weird resolves happening within a frame (which mostly affecty D3D9 since D3D11 stuff will typically hit the native Vulkan functions anyway).There was also a case of
gl_FragDepthexport not being optimized out despite the depth test being turned off, which made things export-bound for no good reason.Emitting dxbc-spirv IR directly has the advantages that we can generate unique shaders for each format, view type etc being fed into these passes, as opposed to having dozens of GLSL files around. The fallback paths previously weren't even complete, with some potential real-world impact for D7VK (@WinterSnowfall), now at least the
copyImageandcopyImageToBufferpaths can almost fully replace the native Vulkan functions (tested AC:Odyssey with that, which is a fairly complex workload for texture copies), only real exceptions would be some cursed color formats that have no texel buffer support, and even that could technically be worked around.Needs a bunch of testing across various games, if anything breaks then it's probably going to happen in a D3D9 game.