Skip to content

Commit

Permalink
nvofapi: Only export used symbols
Browse files Browse the repository at this point in the history
  • Loading branch information
SveSop committed Feb 3, 2025
1 parent 2fcccc6 commit c7d8cb6
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,6 @@ if dxvk_cpu_family == 'x86_64'
name_prefix : '',
dependencies : [ lib_version ],
include_directories : [ nvapi_headers, vk_headers ],
vs_module_defs : 'nvofapi64.def',
install : true)
endif
7 changes: 7 additions & 0 deletions src/nvofapi64.def
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
LIBRARY NVOFAPI64.DLL
EXPORTS
NvOFAPICreateInstanceCuda @1
NvOFAPICreateInstanceD3D11 @2
NvOFAPICreateInstanceD3D12 @3
NvOFAPICreateInstanceVk @4
NvOFGetMaxSupportedApiVersion @5
2 changes: 1 addition & 1 deletion src/nvofapi_cuda.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ extern "C" {

using namespace dxvk;

NV_OF_STATUS __cdecl NvOFAPICreateInstanceCuda(uint32_t apiVer, void* functionList) {
NV_OF_STATUS NVOFAPI NvOFAPICreateInstanceCuda(uint32_t apiVer, void* functionList) {
constexpr auto n = __func__;

if (log::tracing())
Expand Down
2 changes: 1 addition & 1 deletion src/nvofapi_d3d11.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ extern "C" {

using namespace dxvk;

NV_OF_STATUS __cdecl NvOFAPICreateInstanceD3D11(uint32_t apiVer, NV_OF_D3D11_API_FUNCTION_LIST* functionList) {
NV_OF_STATUS NVOFAPI NvOFAPICreateInstanceD3D11(uint32_t apiVer, NV_OF_D3D11_API_FUNCTION_LIST* functionList) {
constexpr auto n = __func__;

if (log::tracing())
Expand Down
2 changes: 1 addition & 1 deletion src/nvofapi_d3d12.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ extern "C" {
}

// ETBLs
NV_OF_STATUS __stdcall NvOFAPICreateInstanceD3D12(uint32_t apiVer, NV_OF_D3D12_API_FUNCTION_LIST* functionList) {
NV_OF_STATUS NVOFAPI NvOFAPICreateInstanceD3D12(uint32_t apiVer, NV_OF_D3D12_API_FUNCTION_LIST* functionList) {
uint32_t apiVerMajor = (apiVer & 0xfffffff0) >> 4;
uint32_t apiVerMinor = (apiVer & 0xf);
constexpr auto n = __func__;
Expand Down

0 comments on commit c7d8cb6

Please sign in to comment.