d3d12: Fix leak in d3d12_resource_from_resource and usage in d3d12 video dec, enc

Reviewed-by: Giancarlo Devich <gdevich@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18328>
This commit is contained in:
Sil Vilerino
2022-07-20 13:31:19 -04:00
parent cdd83c6110
commit 59c45e1ed7
3 changed files with 4 additions and 0 deletions

View File

@@ -705,6 +705,7 @@ d3d12_resource_from_resource(struct pipe_screen *pscreen,
handle.type = WINSYS_HANDLE_TYPE_D3D12_RES;
handle.format = d3d12_get_pipe_format(input_desc.Format);
handle.com_obj = input_res;
input_res->AddRef();
struct pipe_resource templ;
memset(&templ, 0, sizeof(templ));