Skip to content

dlss: the ignored test says why the SDK did not start, not just false - #2989

Open
fiestorra wants to merge 1 commit into
ProjectLeonida:mainfrom
fiestorra:dlss-test-says-why
Open

fiestorra wants to merge 1 commit into
ProjectLeonida:mainfrom
fiestorra:dlss-test-says-why

Conversation

@fiestorra

Copy link
Copy Markdown
Contributor

dlss: the ignored test says why the SDK did not start, not just false

dlss_starts_on_this_card is the only thing that answers "does DLSS work on this
machine", and on a failure of the SDK's own init it printed false and nothing
else: the branch that reports why goes through tracing, and a test binary has
no tracing sink. The next branch down already prints (dlss.rs:202-209), so the
test was half-armed.

That is the shape of #2762: a 3060 Ti whose DLSS reverts to stretch with "No
lines about it". The information existed and nothing printed it.

Measured on an RTX 4090, driver 621.24 (32.0.16.2124), DLSS v310.9.16 fetched
with Get-NVIDIA-DLSS.cmd, layer built with scripts\build-nvidia.ps1:

before: test dlss::tests::dlss_starts_on_this_card ... DLSS available: false
after: test dlss::tests::dlss_starts_on_this_card ...
DLSS did not start: result 0xbad00001, dir <LEONIDA_DLSS_DIR>

and with the driver's nvngx.dll copied beside the test binary, the same test
now says 0xbad00002 - which is how the two failure points were told apart at
all (published in #2570).

0xbad00001 is NVSDK_NGX_Result_FAIL_FeatureNotSupported and 0xbad00002
..._FAIL_PlatformError, from NVIDIA's include/nvsdk_ngx_defs.h; the line
prints whatever code the SDK returns, in the notation of that header.

Test only: the println! is #[cfg(test)], so nothing changes in the layer.

cargo clippy -p leonida-gpu --all-targets 1 warning (host.rs:7628, there on
main; #2877 carries the fix)
cargo test -p leonida-gpu --features dlss --lib -- --ignored dlss_starts

Written with an AI assistant.

`dlss_starts_on_this_card` is the only thing that answers "does DLSS work on this
machine", and on a failure of the SDK's own init it printed `false` and nothing
else: the branch that reports why goes through `tracing`, and a test binary has
no tracing sink. The next branch down already prints (`dlss.rs:202-209`), so the
test was half-armed.

That is the shape of ProjectLeonida#2762: a 3060 Ti whose DLSS reverts to stretch with "No
lines about it". The information existed and nothing printed it.

Measured on an RTX 4090, driver 621.24 (32.0.16.2124), DLSS v310.9.16 fetched
with `Get-NVIDIA-DLSS.cmd`, layer built with `scripts\build-nvidia.ps1`:

  before:  test dlss::tests::dlss_starts_on_this_card ... DLSS available: false
  after:   test dlss::tests::dlss_starts_on_this_card ...
             DLSS did not start: result 0xbad00001, dir <LEONIDA_DLSS_DIR>

and with the driver's `nvngx.dll` copied beside the test binary, the same test
now says `0xbad00002` - which is how the two failure points were told apart at
all (published in ProjectLeonida#2570).

`0xbad00001` is `NVSDK_NGX_Result_FAIL_FeatureNotSupported` and `0xbad00002`
`..._FAIL_PlatformError`, from NVIDIA's `include/nvsdk_ngx_defs.h`; the line
prints whatever code the SDK returns, in the notation of that header.

Test only: the `println!` is `#[cfg(test)]`, so nothing changes in the layer.

  cargo clippy -p leonida-gpu --all-targets   1 warning (host.rs:7628, there on
                                              main; ProjectLeonida#2877 carries the fix)
  cargo test -p leonida-gpu --features dlss --lib -- --ignored dlss_starts

Written with an AI assistant.
@andrew-ai

Copy link
Copy Markdown

Verified the new failure diagnostic at bdc358b on Windows using the same binary and NVIDIA/DLSS 9981c635 release files for both runs. I temporarily changed only the ignored test's device setup so I could choose WARP and identify the actual adapter by its device LUID.

D3D12 device SDK output
Default, NVIDIA GeForce RTX 5070 (0x10de), driver 616.92 DLSS available: true
Explicit WARP, Microsoft Basic Render Driver (0x1414) DLSS did not start: result 0xbad00001, dir followed by the configured SDK directory, then DLSS available: false

Both test processes exited successfully. The printed result distinguishes the two cases. This provides a reproducible unsupported-device control on a host whose default GPU supports DLSS. The source comment added in this diff still attributes the earlier failure to a 4090; the corrected adapter identification in #2993 would be worth reflecting there. Codex-assisted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants