D3D12: Greatly reduce shader conversion time & fix spec constant bitmasking. #111762
+1
−5
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.
Follow-up PR to #111356.
Shader Conversion Time Reduction
Partner PR: godotengine/godot-nir-static#23
Reduces shader conversion time up to 2x - 2.5x depending on the project. In TPS Demo, the loading screen goes from 82 seconds to 33 seconds on my system. For reference, Vulkan is 15 seconds.
NOTE: If you want to make a comparison yourself, you need to clear both Godot and driver shader caches before each launch to have a fair comparison:
project/.godot/shader_cache%APPDATA%/Godot/app_userdata/project/shader_cache%LOCALAPPDATA%/NVIDIA%LOCALAPPDATA%/AMDSpecialization Constants Bitmasking Fix
Partner PR: godotengine/godot-nir-static#22
Old behavior used to set the second MSB to 1, then mask that out inside the DXIL shader. We shouldn't do that anymore now that we allow all of the specialization constant bits.
This was causing less shadow map samples to be used, notably with the "Soft High (Slow)" mode for "Soft Shadow Filter Quality" parameter: