NVIDIAGameWorks / Streamline

Streamline Integration Framework
Other
377 stars 79 forks source link

Enabling DLSSG in D3D11 throw error when calling NvAPI_D3D12_SetAsyncFrameMarker #15

Closed PureDark closed 6 months ago

PureDark commented 1 year ago

It's even happening with the Streamline Sample.

ERROR: [10.04.2023 15-32-03][streamline][error]d3d12.cpp:2554[setAsyncFrameMarker] NvAPI_D3D12_SetAsyncFrameMarker((ID3D12CommandQueue*)queue, &params) failed error -1

I found that it's with this function in sl.compute project's d3d12.cpp

ComputeStatus D3D12::setAsyncFrameMarker(CommandQueue queue, ReflexMarker marker, uint64_t frameId)
{
    NV_LATENCY_MARKER_PARAMS_V1 params = { 0 };
    params.version = NV_LATENCY_MARKER_PARAMS_VER1;
    params.frameID = frameId;
    params.markerType = (NV_LATENCY_MARKER_TYPE)marker;

    NVAPI_CHECK(NvAPI_D3D12_SetAsyncFrameMarker((ID3D12CommandQueue*)queue, &params));
    return ComputeStatus::eOk;
}

And reflex isn't working when DLSSG is enabled or even loaded. I think it has something to do with this error, or maybe not, but it certainly only stopped working when I loaded DLSSG.

You can reproduce this by simply running the Streamline Sample in d3d11 mode.

EDIT: By reflex not working I meant there was no latency report available and the reflex FPS cap wasn't working. I couldn't really tell if reflex itself is working though.

jake-nv commented 6 months ago

DLSS-FG uses D3D11On12 for DX11 support and Reflex doesn't support that use case.