Emulate memory behavior of libSceGnmDriver initialization (#2807)

* Emulate memory behavior of libSceGnmDriver _DT_INIT

Due to the unique way some games check for sceKernelAllocateDirectMemory failures, emulating this properly is necessary.

* Clang

* Fix address input for direct memory call

* Fix bug with DirectQueryAvailable

Missed this in my prior PR.

* DirectQueryAvailable fix

Fixes error cases to be more hardware accurate.
This commit is contained in:
Stephen Miller 2025-04-18 15:41:33 -05:00 committed by GitHub
parent 23c616c647
commit 0feb2e7211
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 16 additions and 10 deletions

View file

@ -2804,7 +2804,7 @@ void RegisterlibSceGnmDriver(Core::Loader::SymbolsResolver* sym) {
liverpool = std::make_unique<AmdGpu::Liverpool>();
presenter = std::make_unique<Vulkan::Presenter>(*g_window, liverpool.get());
const int result = sceKernelGetCompiledSdkVersion(&sdk_version);
const s32 result = sceKernelGetCompiledSdkVersion(&sdk_version);
if (result != ORBIS_OK) {
sdk_version = 0;
}