d3d12: Release sharing contract in flush_frontbuffer

Just a leak I happened to notice.

Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18305>
This commit is contained in:
Jesse Natalie 2022-08-29 12:17:37 -07:00 committed by Marge Bot
parent 035db6f011
commit 0fad769c13

View file

@ -773,6 +773,7 @@ d3d12_flush_frontbuffer(struct pipe_screen * pscreen,
if (SUCCEEDED(screen->cmdqueue->QueryInterface(IID_PPV_ARGS(&sharing_contract)))) {
ID3D12Resource *d3d12_res = d3d12_resource_resource(res);
sharing_contract->Present(d3d12_res, 0, WindowFromDC((HDC)winsys_drawable_handle));
sharing_contract->Release();
}
#endif