build(deps): move nvapi to official NVIDIA repo and bump to R590 (#3725)
This commit is contained in:
8
.gitmodules
vendored
8
.gitmodules
vendored
@@ -38,10 +38,10 @@
|
|||||||
path = third-party/nv-codec-headers
|
path = third-party/nv-codec-headers
|
||||||
url = https://github.com/FFmpeg/nv-codec-headers.git
|
url = https://github.com/FFmpeg/nv-codec-headers.git
|
||||||
branch = sdk/12.0
|
branch = sdk/12.0
|
||||||
[submodule "third-party/nvapi-open-source-sdk"]
|
[submodule "third-party/nvapi"]
|
||||||
path = third-party/nvapi-open-source-sdk
|
path = third-party/nvapi
|
||||||
url = https://github.com/LizardByte/nvapi-open-source-sdk.git
|
url = https://github.com/NVIDIA/nvapi.git
|
||||||
branch = sdk
|
branch = main
|
||||||
[submodule "third-party/Simple-Web-Server"]
|
[submodule "third-party/Simple-Web-Server"]
|
||||||
path = third-party/Simple-Web-Server
|
path = third-party/Simple-Web-Server
|
||||||
url = https://github.com/LizardByte-infrastructure/Simple-Web-Server.git
|
url = https://github.com/LizardByte-infrastructure/Simple-Web-Server.git
|
||||||
|
|||||||
@@ -31,9 +31,9 @@ add_definitions(-DMINIUPNP_STATICLIB)
|
|||||||
add_subdirectory(tools) # todo - this is temporary, only tools for Windows are needed, for now
|
add_subdirectory(tools) # todo - this is temporary, only tools for Windows are needed, for now
|
||||||
|
|
||||||
# nvidia
|
# 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
|
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/*.cpp"
|
||||||
"${CMAKE_SOURCE_DIR}/src/platform/windows/nvprefs/*.h")
|
"${CMAKE_SOURCE_DIR}/src/platform/windows/nvprefs/*.h")
|
||||||
|
|
||||||
|
|||||||
@@ -4,16 +4,35 @@
|
|||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
// local includes first so standard library headers are pulled in before nvapi's SAL macros
|
||||||
|
#include "undo_data.h"
|
||||||
|
|
||||||
// nvapi headers
|
// nvapi headers
|
||||||
// disable clang-format header reordering
|
// disable clang-format header reordering
|
||||||
// as <NvApiDriverSettings.h> needs types from <nvapi.h>
|
// as <NvApiDriverSettings.h> needs types from <nvapi.h>
|
||||||
// clang-format off
|
// 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 <nvapi.h>
|
||||||
#include <NvApiDriverSettings.h>
|
#include <NvApiDriverSettings.h>
|
||||||
// clang-format on
|
|
||||||
|
|
||||||
// local includes
|
#if defined(__GNUC__)
|
||||||
#include "undo_data.h"
|
#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 {
|
namespace nvprefs {
|
||||||
|
|
||||||
|
|||||||
1
third-party/nvapi
vendored
Submodule
1
third-party/nvapi
vendored
Submodule
Submodule third-party/nvapi added at 9296d671e7
1
third-party/nvapi-open-source-sdk
vendored
1
third-party/nvapi-open-source-sdk
vendored
Submodule third-party/nvapi-open-source-sdk deleted from cce4e90b62
Reference in New Issue
Block a user