Skip to content

Commit

Permalink
nvofapi: NvOFAPICreateInstanceCuda - stub
Browse files Browse the repository at this point in the history
This will return NV_OF_ERR_OF_NOT_AVAILABLE for NvOFAPICreateInstanceCuda

Signed-off-by: Sveinar Søpler <[email protected]>
  • Loading branch information
SveSop committed Feb 2, 2025
1 parent c8c60a4 commit a58b327
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ nvofapi_src = files([
'nvofapi.cpp',
'nvofapi_d3d12.cpp',
'nvofapi_vk.cpp',
'nvofapi_cuda.cpp',
])

# Only build 64-bit versions of nvofapi
Expand Down
39 changes: 39 additions & 0 deletions src/nvofapi_cuda.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*
* SPDX-License-Identifier: MIT
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/

#include "nvofapi_private.h"
#include "util/util_log.h"
#include "util/util_statuscode.h"

extern "C" {

using namespace dxvk;

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

if (log::tracing())
log::trace(n, apiVer, log::fmt::ptr(functionList));

return OFNotAvailable(n);
}
}
1 change: 1 addition & 0 deletions tests/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ nvofapi_tests_src = files([
'nvofapi_main.cpp',
'nvofapi_d3d12.cpp',
'nvofapi_vk.cpp',
'nvofapi_cuda.cpp',
])

target_name = 'nvofapi'+target_suffix+'-tests'
Expand Down
4 changes: 2 additions & 2 deletions tests/nvofapi_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include "../inc/catch_amalgamated.hpp"
#include "nvofapi/section_listener.h"

CATCH_REGISTER_TAG_ALIAS("[@unit-tests]", "[d3d12],[vk]")
CATCH_REGISTER_TAG_ALIAS("[@all]", "[d3d12],[vk]")
CATCH_REGISTER_TAG_ALIAS("[@unit-tests]", "[d3d12],[vk],[cuda]")
CATCH_REGISTER_TAG_ALIAS("[@all]", "[d3d12],[vk],[cuda]")

CATCH_REGISTER_LISTENER(SectionListener)

0 comments on commit a58b327

Please sign in to comment.