Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/jp7677/dxvk-nvapi.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'tests/nvapi_sysinfo.cpp')
-rw-r--r--tests/nvapi_sysinfo.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/nvapi_sysinfo.cpp b/tests/nvapi_sysinfo.cpp
index 69b2aae..7a48147 100644
--- a/tests/nvapi_sysinfo.cpp
+++ b/tests/nvapi_sysinfo.cpp
@@ -765,6 +765,23 @@ TEST_CASE("Sysinfo methods succeed", "[.sysinfo]") {
REQUIRE(width == linkWidth);
}
+ SECTION("GetIrq returns OK") {
+ auto irqNum = 143U;
+ ALLOW_CALL(*nvml, DeviceGetIrqNum(_, _)) // NOLINT(bugprone-use-after-move)
+ .LR_SIDE_EFFECT(*_2 = irqNum)
+ .RETURN(NVML_SUCCESS);
+
+ SetupResourceFactory(std::move(dxgiFactory), std::move(vulkan), std::move(nvml), std::move(lfx));
+ REQUIRE(NvAPI_Initialize() == NVAPI_OK);
+
+ NvPhysicalGpuHandle handle;
+ REQUIRE(NvAPI_SYS_GetPhysicalGpuFromDisplayId(0, &handle) == NVAPI_OK);
+
+ NvU32 irq;
+ REQUIRE(NvAPI_GPU_GetIRQ(handle, &irq) == NVAPI_OK);
+ REQUIRE(irq == irqNum);
+ }
+
SECTION("GetGpuCoreCount returns OK") {
auto cores = 1536U;
ALLOW_CALL(*nvml, DeviceGetNumGpuCores(_, _)) // NOLINT(bugprone-use-after-move)
@@ -1178,6 +1195,8 @@ TEST_CASE("Sysinfo methods succeed", "[.sysinfo]") {
SECTION("NVML depending methods return no-implementation when NVML is not available") {
NvU32 width;
REQUIRE(NvAPI_GPU_GetCurrentPCIEDownstreamWidth(handle, &width) == NVAPI_NO_IMPLEMENTATION);
+ NvU32 irq;
+ REQUIRE(NvAPI_GPU_GetIRQ(handle, &irq) == NVAPI_NO_IMPLEMENTATION);
NvU32 cores;
REQUIRE(NvAPI_GPU_GetGpuCoreCount(handle, &cores) == NVAPI_NO_IMPLEMENTATION);
NV_GPU_DYNAMIC_PSTATES_INFO_EX info;
@@ -1218,6 +1237,8 @@ TEST_CASE("Sysinfo methods succeed", "[.sysinfo]") {
SECTION("NVML depending methods return handle-invalidated when NVML is available but without suitable adapter") {
NvU32 width;
REQUIRE(NvAPI_GPU_GetCurrentPCIEDownstreamWidth(handle, &width) == NVAPI_HANDLE_INVALIDATED);
+ NvU32 irq;
+ REQUIRE(NvAPI_GPU_GetIRQ(handle, &irq) == NVAPI_HANDLE_INVALIDATED);
NvU32 cores;
REQUIRE(NvAPI_GPU_GetGpuCoreCount(handle, &cores) == NVAPI_HANDLE_INVALIDATED);
NV_GPU_DYNAMIC_PSTATES_INFO_EX info;