feat(graphics/rdr3): various graphics improvements#3840
Merged
Conversation
radium-cfx
approved these changes
Feb 26, 2026
This commit consists of various improvements I've had laying around since the original RenderHooks rdr3 implementation. Aimed at tackling various common graphics issues along with matching some behaviours with FiveM. The core changes are as following: - Move glues VK external handle code to shared VulkanHelper file in rage-graphics-rdr3 - Corrected behaviour in the VK external handle logic to hopefully resolve "Failed to allocate memory for vulkan" errors on various hardware configurations - Match FiveM's behaviour by forcing the UMD for D3D12 and Vulkan to load before the game is ready. May also help with other Vulkan related errors. - Added start up checks for the Dedicated GPU used for the game to ensure it has the proper support required for RedM on top of the existing requirements for RDR2. - Block vulkan from being used if the GPU used is not able to support the needed Vulkan functionality in RedM. - Hook D3D12CreateDevice calls to force D3D12 to use the dedicated GPU similar to vulkan. - Backported render sleep changes and "no ShowWindow early" patches from FiveM to make the games launch feel smoother. - Provide crashometry with data related to vulkan/d3d12 from the game it self, this may be useful in debugging graphics related errors. - Introduce "UiDone" logic to RedM, this existed in FiveM and was used to show the game window when mpMenu is ready. - Remove 'ERR_GFX_STATE' error messages, replacing them with D3D12/Vulkan call failure messages providing data from those Graphic APIs. - Introduce pipeline cache clearing from any D3D12/Vulkan call failures or ERR_GFX_STATE.
107b0ef to
c0bf21c
Compare
4 tasks
4 tasks
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.
Goal of this PR
This PR consists of dozens of small graphics changes combined to fix several issues and improve startup behaviour within RedM.
The core changes in this patch are:
How is this PR achieving the goal
This PR applies to the following area(s)
RedM
Successfully tested on
Tested on a feature branch given to users having issues with Vulkan.
Game builds: 1491
Platforms: Windows,
Checklist
Fixes issues
https://forum.cfx.re/t/redm-fails-during-rockstar-launcher-initialization-vulkan-memory-error-rtx-4060-ti/5383341
https://forum.cfx.re/t/failed-to-allocate-memory-for-vulkan-vkresult-4294967283/5384919/2
https://forum.cfx.re/t/failed-to-allocate-memory-for-vulkan-upon-launching-redm/5374697/4
https://forum.cfx.re/t/failed-to-allocate-memory-for-vulkan-upon-launching-redm/5375052
https://forum.cfx.re/t/getting-failed-to-allocate-memory-for-vulcan-when-using-dx12/5371039/5
https://forum.cfx.re/t/failed-to-allocate-memory-for-vulkan-upon-launching-redm/5375052/2
https://forum.cfx.re/t/have-to-delete-the-data-folder-every-time-i-want-to-play-redm/5378511
https://forum.cfx.re/t/redm-giving-me-a-vulkan-issue/5341791