Fix vulkan crash on NVIDIA drivers >= 595 in Arknights: Endfield by removing API hook overrides#344
Merged
Kaldaien merged 1 commit intoSpecialKO:mainfrom Mar 16, 2026
Conversation
…s >= 595 in Arknights: Endfield
Member
|
I don't understand how |
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.
Sorry about this. In my previous PR, I think i added some API overrides in
config.cppfor endfield and set them tofalse. Because of that, the[API.HOOK]d3d12option becomesfalseby default on the first launch. This PR removes the API overrides I previously added for Endfield and lets Special K use its original default behavior instead.It turns out this can cause a crash on NVIDIA drivers >= 595 (thanks to IIIelKot and Meatball_Beam for pointing this out on discord).
From what I understand, when we set
prefer layered on DXGI Swapchainin nvcp or vulkan bridge on driver version >= 595, special K may detect a native D3D12 swapchain during first creation. If the D3D12 hook is disabled, the code dereferences a null pointer indxgi.cpparound line 7652:(*ppSwapChain)->SetPrivateData(SKID_D3D12_SwapChainCommandQueue, sizeof(void *), pCmdQueue)Setting the D3D12 hook back to
truein specialk.ini avoids the crash on my machine. It is set to false by default on first launch because of this mistake at previous PR. Maybe in the future, it also be safer to add a null-pointer check there.