d3d12: Remove usage of WindowFromDC when building without d3d12 graphics

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30996>
This commit is contained in:
Sil Vilerino
2024-01-23 17:43:29 -05:00
committed by Marge Bot
parent 3d6280c3c5
commit 1b39a519ca

View File

@@ -876,7 +876,7 @@ d3d12_flush_frontbuffer(struct pipe_screen * pscreen,
winsys->displaytarget_unmap(winsys, res->dt);
}
#if defined(_WIN32) && !defined(_GAMING_XBOX)
#if defined(_WIN32) && !defined(_GAMING_XBOX) && defined(HAVE_GALLIUM_D3D12_GRAPHICS)
// WindowFromDC is Windows-only, and this method requires an HWND, so only use it on Windows
ID3D12SharingContract *sharing_contract;
if (SUCCEEDED(screen->cmdqueue->QueryInterface(IID_PPV_ARGS(&sharing_contract)))) {