Repository navigation
Official NVAPI R560 release is broken!!! #11
Description
Activity
I suspect this is the cause of my build errors in the following as well.
- build(deps): bump third-party/nvapi-open-source-sdk from
cce4e90toc873858LizardByte/Sunshine#3015 - build(deps): move nvapi to official NVIDIA repo and bump to R590 LizardByte/Sunshine#3725
I have my own dist of this (https://github.com/LizardByte/nvapi-open-source-sdk) which I created before the official repo existed. I am now trying to move to the official one, but the R555 version is missing
nvapi_interface.hso it cannot be used as is. https://github.com/NVIDIA/nvapi/tree/fab23132652026fe9bb42c2c4cac452bddfcc5a9At a bare minimum would it be possible for a maintainer to edit the git history and fix the R555 version?
- build(deps): bump third-party/nvapi-open-source-sdk from
This is still broken in R590... sad...
The following resolved it for me.
// nvapi headers // disable clang-format header reordering // as <NvApiDriverSettings.h> needs types from <nvapi.h> // clang-format off // With GCC/MinGW, nvapi_lite_salend.h (included transitively via nvapi_lite_d3dext.h) // undefines all SAL annotation macros (e.g. __success, __in, __out, __inout) after // nvapi_lite_salstart.h had defined them. This leaves NVAPI_INTERFACE and other macros // that use SAL annotations broken for the rest of nvapi.h. Defining __NVAPI_EMPTY_SAL // makes nvapi_lite_salend.h a no-op, preserving the SAL macro definitions throughout. // After nvapi.h, we include nvapi_lite_salend.h explicitly (without __NVAPI_EMPTY_SAL) // to clean up the SAL macros and prevent them from polluting subsequent includes. #if defined(__GNUC__) #define __NVAPI_EMPTY_SAL #endif #include <nvapi.h> #include <NvApiDriverSettings.h> #if defined(__GNUC__) #undef __NVAPI_EMPTY_SAL // Clean up SAL macros that nvapi_lite_salstart.h defined and salend.h was // prevented from cleaning up (due to __NVAPI_EMPTY_SAL above). #include <nvapi_lite_salend.h> #endif // clang-format on
I used Claude Sonnet 4.6 to create the solution.
Another (probably cleaner) solution would be to reorder
#include"nvapi_lite_salstart.h"in nvapi.h as the last include.
Probably got messed up by some automatic header reordering tool?Reacted by Dave Lane
@sujatas-NV @planke-NV @arunimam-NV
nvapi.hincludesnvapi_lite_salstart.hwhich in turn uses a symbolNvAPI_Statuswhich is only defined later innvapi_lite_common.h(which also includesnvapi_lite_salstart.hbefore it defines the symbol).This level of software engineering incompetence with basic C/C++ stuff such as header files, order of including, avoiding cyclic inclusions, and symbols being used before defining is staggering even when it doesn't result in unusable release -- I'd expect it from students learning C in high school class, not from NVIDIA employees even if those are new hires.
You all should be ashamed of yourself for allowing this to be released in such a broken state both here and in
R560-developer.zipdownload fromdeveloper.nvidia.com.Bug ID #4919663.