dxgi: Support creating a fullscreen swapchain on d3d12.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
39cf65e48f
commit
0a322f0ca5
|
@ -2981,11 +2981,34 @@ static HRESULT d3d12_swapchain_init(struct d3d12_swapchain *swapchain, IWineDXGI
|
|||
|
||||
hr = wined3d_swapchain_desc_from_dxgi(&wined3d_desc, output, window, swapchain_desc,
|
||||
fullscreen_desc);
|
||||
IDXGIOutput_Release(output);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
IDXGIOutput_Release(output);
|
||||
return hr;
|
||||
}
|
||||
|
||||
if (FAILED(hr = wined3d_swapchain_state_create(&wined3d_desc, window, &swapchain->state)))
|
||||
{
|
||||
IDXGIOutput_Release(output);
|
||||
return hr;
|
||||
}
|
||||
|
||||
if (!fullscreen_desc->Windowed)
|
||||
{
|
||||
hr = wined3d_swapchain_state_set_fullscreen(swapchain->state, &wined3d_desc, NULL);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
wined3d_swapchain_state_destroy(swapchain->state);
|
||||
IDXGIOutput_Release(output);
|
||||
return hr;
|
||||
}
|
||||
|
||||
swapchain->target = output;
|
||||
}
|
||||
else
|
||||
{
|
||||
IDXGIOutput_Release(output);
|
||||
}
|
||||
|
||||
if (swapchain_desc->BufferUsage && swapchain_desc->BufferUsage != DXGI_USAGE_RENDER_TARGET_OUTPUT)
|
||||
FIXME("Ignoring buffer usage %#x.\n", swapchain_desc->BufferUsage);
|
||||
|
@ -3002,8 +3025,6 @@ static HRESULT d3d12_swapchain_init(struct d3d12_swapchain *swapchain, IWineDXGI
|
|||
FIXME("Unhandled scanline ordering %#x.\n", fullscreen_desc->ScanlineOrdering);
|
||||
if (fullscreen_desc->Scaling)
|
||||
FIXME("Unhandled mode scaling %#x.\n", fullscreen_desc->Scaling);
|
||||
if (!fullscreen_desc->Windowed)
|
||||
FIXME("Fullscreen not supported yet.\n");
|
||||
|
||||
vk_instance = vkd3d_instance_get_vk_instance(vkd3d_instance_from_device(device));
|
||||
vk_physical_device = vkd3d_get_vk_physical_device(device);
|
||||
|
|
|
@ -2953,7 +2953,6 @@ static void test_default_fullscreen_target_output(IUnknown *device, BOOL is_d3d1
|
|||
ok(SUCCEEDED(hr), "Adapter %u output %u: GetFullscreenState failed, hr %#x.\n",
|
||||
adapter_idx, output_idx, hr);
|
||||
ok(fullscreen, "Adapter %u output %u: Expected fullscreen.\n", adapter_idx, output_idx);
|
||||
todo_wine_if(is_d3d12)
|
||||
ok(!!containing_output, "Adapter %u output %u: Expected a valid output.\n", adapter_idx,
|
||||
output_idx);
|
||||
if (containing_output)
|
||||
|
@ -2962,7 +2961,7 @@ static void test_default_fullscreen_target_output(IUnknown *device, BOOL is_d3d1
|
|||
ret = GetWindowRect(swapchain_desc.OutputWindow, &window_rect);
|
||||
ok(ret, "Adapter %u output %u: GetWindowRect failed, error %#x.\n", adapter_idx,
|
||||
output_idx, GetLastError());
|
||||
todo_wine_if(is_d3d12) ok(EqualRect(&window_rect, &output_desc.DesktopCoordinates),
|
||||
ok(EqualRect(&window_rect, &output_desc.DesktopCoordinates),
|
||||
"Adapter %u output %u: Expect window rect %s, got %s.\n", adapter_idx,
|
||||
output_idx, wine_dbgstr_rect(&output_desc.DesktopCoordinates),
|
||||
wine_dbgstr_rect(&window_rect));
|
||||
|
|
Loading…
Reference in New Issue