-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NVML 515 #89
NVML 515 #89
Conversation
Hi @Saancreed, thanks a lot for already opening this draft PR and really cool that you are working again on the nvml side here and in your repo. PS: I haven’t looked, but would be cool if the new headers allows us later to add an implementation to https://github.com/jp7677/dxvk-nvapi/blob/master/src/nvapi_gpu.cpp#L619 since that method is used in UE4, though I have never investigated what UE4 does once this call succeeds. |
I am not really aware of anything breaking without this function. Nifty to have when benchmarking or whatnot for those windows tools that uses that (Unigine Valley/Heaven comes to mind). |
Oh dear, having tests crash on me with no debug symbols is not a fun experience. But they should be working now. Some more notes:
The only functional change is adapting
Anyway, I think it's ready for review now so I'm marking it as such. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I finished the first round, looks really good!
Just in case you haven't already, could you also run clang-format
with the rules in the project?
…viceGetDynamicPstatesInfo
I'm sorry, got too annoyed by this.
…etThermalSettings
…andle some quirks
Also extract mapping bus type to a function.
An attempt to reimplement a few NVAPI functions using better NVML counterparts from newer API versions. Not tested yet because the only Windows machine I have at hand is a very small VM I set up on my laptop and doing GPU passthrough is annoying so I wanted to gather some feedback and ensure you're willing to accept a PR like this before actually getting my hands dirty 😅
Some notes:
nvmlDeviceGetDynamicPstatesInfo
andnvmlDeviceGetThermalSettings
seem to be almost direct "ports" ofNvAPI_GPU_GetDynamicPstatesInfoEx
andNvAPI_GPU_GetThermalSettings
respectively, but apparently they are not exactly the same (pending some testing):nvmlDeviceGetDynamicPstatesInfo
hasflags
which are "reserved for future use", whileNvAPI_GPU_GetDynamicPstatesInfoEx
has one already documented flagnvmlDeviceGetThermalSettings
acceptsNVAPI_THERMAL_TARGET_ALL
forsensorIndex
to retrieve info for all sensors likeNvAPI_GPU_GetThermalSettings
doesnvmlDeviceGetThermalSettings
closer to V1 version ofNvAPI_GPU_GetThermalSettings
, fortunately we should be able to safely cast values from expected range to signed integers for V2 and just never report negative values this wayNvAPI_GPU_GetCurrentPCIEDownstreamWidth
usingnvmlDeviceGetCurrPcieLinkWidth
(wasn't this previously stubbed out?)NvAPI_GPU_GetIRQ
usingnvmlDeviceGetIrqNum
NvAPI_GPU_GetGpuCoreCount
usingnvmlDeviceGetNumGpuCores
In the meantime, I'm working on the next version of
wine-nvml
that uses Wine's unixlib syscall interface and automatically generates code from NVIDIA's API header, which in theory should make adding support for new functions as they get released much easier in the future.