Repository navigation
Report failed vendor upscaler calls - #324
Conversation
Failed vendor calls were silent: creation returned "FAILURE" with no message (a missing or
incomplete FSR loader, "ffxCreateContext", the XeSS calls, NGX initialization and feature
creation), and a failed dispatch ("ffxDispatch", "xessSetExposureMultiplier", "xessD3D12Execute",
NGX evaluation) was an "NRI_CHECK", compiled out of release builds. Each now reports through
"NRI_REPORT_ERROR", naming the call and its result, in release builds too.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Thanks. The intent is good, but reporting errors also invokes How should we handle this?
|
Agreed, aborting is wrong here: a failed vendor call is the vendor's answer, not a misuse of NRI. Suggestion, using what Result already encodes:
If this solution is accepted, I'll push a commit to this PR to fix it. |
|
Sounds good. Hmm, what about adding |
|
That works for me, it's clean and unambiguous like that for the caller too. I'll make a commit here to add that and the abort fix today after work if everything else checks out. |
|
Perfect. Please, don't forget to apply this logic everywhere. I have just updated D3D12MA in NRI. So, after merging this one, I will create |
A failed vendor call is the vendor's answer, not a misuse of NRI, but it was reported with
"Result::FAILURE", which calls "AbortExecution" (by default a break or a trap, in release builds
too). New "Result::EXT_ERROR" (-5) is reported without it:
- upscalers: creation reports and returns it for every failed FFX, XeSS and NGX call ("FfxConvertError"
and "XessConvertError" are gone, they mapped vendor codes to aborting results); a failed dispatch and
MetalFX scaler creation report it
- NVAPI: "NRI_REPORT_ERROR_ON_BAD_NVAPI_STATUS" reports it; the Reflex calls report and return it
instead of a bare "FAILURE"; a D3D11 shading rate view reports and returns it (it was an
"INVALID_ARGUMENT" from "ID3D11Device::CreateXxxView")
- AGS: device creation reports and returns it; D3D11 NVAPI and AGS commands report it
("NRI_RETURN_ON_EXT_FAILURE")
- a failed "NvAPI_Initialize" or "agsInitialize" is a warning: the device is created without the
extension, as with a missing AGS library. So is a refused "NvAPI_D3D12_EnableRaytracingValidation",
which was silent
|
Pushed 5e12091. As discussed: added Extended to the other places where a 3rd party failure aborted or was silent:
Points that could go either way, are they OK like this?
|
|
Updated this PR so applications can fall back after optional SDK failures while retaining normal handling of rendering errors:
|
|
Probably, there will be another cleanup in the future but this is outside of this PR. So,
|
|
Thanks for the help! Merged. |
|
My intention is - report a meaningful |
Failed vendor calls in
UpscalerInterface.hppare silent::1083), a failedffxCreateContext, XeSS call, or NGX initialization or feature creation returnsFAILUREwith no message. Only MetalFX reports one (:1883).ffxDispatch(:1657),xessSetExposureMultiplier,xessD3D12Execute(:1686) or NGX evaluation (:1757,:1862) is anNRI_CHECK, gone in release builds, so the upscale silently doesn't happen.This reports each through
NRI_REPORT_ERROR, naming the call and its result (and the library for FSR), in release builds too. Success paths are unchanged.Measured on v191, RTX 4070 SUPER, vendor DLLs removed: FSR and DLSS super resolution go from a silent
FAILUREto'amd_fidelityfx_loader_dx12.dll' can't be loadedandNGX feature creation failed, result = 0xBAD0000B.