-
Notifications
You must be signed in to change notification settings - Fork 283
Description
When a ffxQuery is called with a ID3D12Device*, the GetExternalProviders is going to leak the resource.
ffxQueryDescGetVersions versionsDesc{
.header{
.type = FFX_API_QUERY_DESC_TYPE_GET_VERSIONS,
},
.createDescType = FFX_API_CREATE_CONTEXT_DESC_TYPE_UPSCALE,
.device = device,
.outputCount = &versionCount,
};
ffxQuery(nullptr, &versionsDesc.header);
The GetExternalProviders creates an IAmdExtFfxApi* object which holds a reference to the device
HRESULT hr = AmdExtD3DCreateInterface(device, IID_PPV_ARGS(&apiExtension));
but this IAmdExtFfxApi* is a function visible global pointer which never will be released.
I understand that the intention behind this function visible global pointer was to cache the IAmdExtFfxApi* but now at teardown of engine and hardware abstraction layer the engine's ID3D12Device* can not be released due to the increased refence count by static IAmdExtFfxApi* apiExtension.
during ffxDestroyContext this cache should be released as well.
While this problem exists, we are going to use a workaround in our projects
GaijinEntertainment@64fa37e