Skip to content

tweak(graphics/rdr3): include handle properties when fetching memory type#3880

Open
Ehbw wants to merge 1 commit intocitizenfx:masterfrom
Ehbw:tweak/rdr3-improved-vulkan-d3d11-import
Open

tweak(graphics/rdr3): include handle properties when fetching memory type#3880
Ehbw wants to merge 1 commit intocitizenfx:masterfrom
Ehbw:tweak/rdr3-improved-vulkan-d3d11-import

Conversation

@Ehbw
Copy link
Copy Markdown
Contributor

@Ehbw Ehbw commented Mar 22, 2026

Goal of this PR

Further improve the external handle import logic for Vulkan. Hopefully should address any remaining cases of Failed to allocate memory for Vulkan. VkResult: VK_ERROR_OUT_OF_DEVICE_MEMORY A device memory allocation has failed. that's occur on some mobile (laptop) GPU configurations.

How is this PR achieving the goal

Introduce assertion to clearly point out if NUI/CEF has given us a null or invalid handle to clearly separate these problems from the error mentioned above.

Change ResultToString default error to be formatted as a signed int32_t as VkResult is signed and all error codes are negative.

Fetch the D3D11 shareHandles memoryTypeBits with _vkGetMemoryWin32HandlePropertiesKHR and takes that into consideration when fetching the memoryType index to be used with allocation

This PR applies to the following area(s)

RedM

Successfully tested on

Game builds: 1491

Platforms: Windows

Checklist

  • Code compiles and has been tested successfully.
  • Code explains itself well and/or is documented.
  • My commit message explains what the changes do and what they are for.
  • No extra compilation warnings are added by these changes.

Fixes issues

@github-actions github-actions bot added RedM Issues/PRs related to RedM invalid Requires changes before it's considered valid and can be (re)triaged labels Mar 22, 2026
@Ehbw Ehbw force-pushed the tweak/rdr3-improved-vulkan-d3d11-import branch from 603f840 to a0632ea Compare March 22, 2026 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

invalid Requires changes before it's considered valid and can be (re)triaged RedM Issues/PRs related to RedM

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant