jp7677 / dxvk-nvapi

Alternative NVAPI implementation on top of DXVK.
MIT License
353 stars 32 forks source link

nvapi-gpu: Fake several NVML related methods #117

Closed jp7677 closed 1 year ago

jp7677 commented 1 year ago

Lets see how we get away for The Last Of Us...

Return OK for GetGpuCoreCount, GetAllClockFrequencies and GetPstates20 when detecting The Last of Us part 1. Otherwise this title wont start.

jp7677 commented 1 year ago

For reference:

---------- 2023-03-29 20:38:14 ----------
NvAPI_QueryInterface (0xad298d3f): Unknown function ID
DXVK-NVAPI v0.6.2-14-gb672395 (tlou-i.exe)
Successfully acquired Vulkan vkGetInstanceProcAddr @ 0x3b6dc40a0
NvAPI Device: NVIDIA GeForce RTX 2080 (525.47.15)
NvAPI Output: \\.\DISPLAY1
NvAPI_Initialize: OK
NvAPI_QueryInterface (0x33c7358c): Unknown function ID
NvAPI_QueryInterface (0x593e8644): Unknown function ID
NvAPI_EnumPhysicalGPUs: OK
NvAPI_SYS_GetDriverAndBranchVersion: OK
NvAPI_GPU_GetArchInfo: OK
NvAPI_Initialize: OK
NvAPI_SYS_GetDriverAndBranchVersion: OK
NvAPI_EnumPhysicalGPUs: OK
NvAPI_GPU_GetPCIIdentifiers: OK
NvAPI_GPU_GetArchInfo: OK
NvAPI_GPU_GetGpuCoreCount: OK
NvAPI_GPU_GetPstates20: OK
NvAPI_GPU_GetAllClockFrequencies: OK
NvAPI_QueryInterface NvAPI_GPU_GetMemoryInfoEx: Not implemented method
NvAPI_Initialize: OK
NvAPI_DRS_CreateSession: OK
NvAPI_DRS_LoadSettings: OK
NvAPI_DRS_GetBaseProfile: OK
NvAPI_DRS_GetSetting (0x10afb76b/Unknown): Setting not found
NvAPI_EnumPhysicalGPUs: OK
NvAPI_GPU_GetAdapterIdFromPhysicalGpu: OK
NvAPI_DRS_GetSetting (0x10e41df2/Unknown): Setting not found
NvAPI_QueryInterface (0xf2400ab): Unknown function ID
NvAPI_EnumPhysicalGPUs: OK
NvAPI_DRS_GetSetting (0x10e41df2/Unknown): Setting not found
NvAPI_GPU_GetArchInfo: OK
NvAPI_SYS_GetDriverAndBranchVersion: OK
NvAPI_DRS_GetSetting (0x10afb764/Unknown): Setting not found
NvAPI_DRS_CreateSession: OK
NvAPI_QueryInterface (0xa782ea46): Unknown function ID
NvAPI_DRS_FindApplicationByName (Z:\mnt\cdrive0\Games\The Last of Us Part I\tlou-i.exe): Executable not found
NvAPI_DRS_DestroySession: OK
NvAPI_Initialize: OK
NvAPI_DRS_CreateSession: OK
NvAPI_DRS_LoadSettings: OK
NvAPI_DRS_GetBaseProfile: OK
NvAPI_DRS_GetSetting (0x10afb76b/Unknown): Setting not found
NvAPI_D3D12_IsFatbinPTXSupported: OK
NvAPI_EnumPhysicalGPUs: OK
NvAPI_GPU_GetAdapterIdFromPhysicalGpu: OK
NvAPI_GPU_GetArchInfo: OK
NvAPI_D3D12_GetGraphicsCapabilities (sm_75): OK
NvAPI_DRS_GetSetting (0x10afb76a/Unknown): Setting not found
NvAPI_DRS_GetSetting (0x10afb76c/Unknown): Setting not found
NvAPI_D3D12_CreateCubinComputeShaderWithName: OK
NvAPI_D3D12_CaptureUAVInfo: OK
NvAPI_D3D12_GetCudaTextureObject: OK
NvAPI_D3D12_LaunchCubinShader: OK
jp7677 commented 1 year ago

Something to consider for later when testing is easier, this title seems handle a not existing function just fine.

NvAPI_QueryInterface NvAPI_GPU_GetMemoryInfoEx: Not implemented method

May be the game is okay with failure to query a function but not with failure to call it? If this is indeed the case, we could eventually greatly simplify the current work around.