build(deps): move nvapi to official NVIDIA repo and bump to R590 (#3725)

This commit is contained in:
David Lane
2026-03-08 22:04:09 -04:00
committed by GitHub
parent f04f6a2bde
commit 7e3cf7025d
5 changed files with 29 additions and 10 deletions
+4 -4
View File
@@ -38,10 +38,10 @@
path = third-party/nv-codec-headers
url = https://github.com/FFmpeg/nv-codec-headers.git
branch = sdk/12.0
[submodule "third-party/nvapi-open-source-sdk"]
path = third-party/nvapi-open-source-sdk
url = https://github.com/LizardByte/nvapi-open-source-sdk.git
branch = sdk
[submodule "third-party/nvapi"]
path = third-party/nvapi
url = https://github.com/NVIDIA/nvapi.git
branch = main
[submodule "third-party/Simple-Web-Server"]
path = third-party/Simple-Web-Server
url = https://github.com/LizardByte-infrastructure/Simple-Web-Server.git
+2 -2
View File
@@ -31,9 +31,9 @@ add_definitions(-DMINIUPNP_STATICLIB)
add_subdirectory(tools) # todo - this is temporary, only tools for Windows are needed, for now
# nvidia
include_directories(SYSTEM "${CMAKE_SOURCE_DIR}/third-party/nvapi-open-source-sdk")
include_directories(SYSTEM "${CMAKE_SOURCE_DIR}/third-party/nvapi")
file(GLOB NVPREFS_FILES CONFIGURE_DEPENDS
"${CMAKE_SOURCE_DIR}/third-party/nvapi-open-source-sdk/*.h"
"${CMAKE_SOURCE_DIR}/third-party/nvapi/*.h"
"${CMAKE_SOURCE_DIR}/src/platform/windows/nvprefs/*.cpp"
"${CMAKE_SOURCE_DIR}/src/platform/windows/nvprefs/*.h")
+22 -3
View File
@@ -4,16 +4,35 @@
*/
#pragma once
// local includes first so standard library headers are pulled in before nvapi's SAL macros
#include "undo_data.h"
// 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>
// clang-format on
// local includes
#include "undo_data.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
namespace nvprefs {
Vendored Submodule
+1
Submodule third-party/nvapi added at 9296d671e7