Signed-off-by: Józef Kucia jkucia@codeweavers.com --- dlls/dxgi/swapchain.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/dlls/dxgi/swapchain.c b/dlls/dxgi/swapchain.c index cf084f7183c2..07764826c01b 100644 --- a/dlls/dxgi/swapchain.c +++ b/dlls/dxgi/swapchain.c @@ -85,7 +85,7 @@ BOOL dxgi_validate_swapchain_desc(const DXGI_SWAP_CHAIN_DESC1 *desc) case DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL: min_buffer_count = 2;
- if (!dxgi_validate_flip_swap_effect_format(desc->Format)) + if (desc->Format && !dxgi_validate_flip_swap_effect_format(desc->Format)) return FALSE;
if (desc->SampleDesc.Count != 1 || desc->SampleDesc.Quality) @@ -738,6 +738,9 @@ HRESULT d3d11_swapchain_init(struct d3d11_swapchain *swapchain, struct dxgi_devi */ if (!implicit) { + if (desc->backbuffer_format == WINED3DFMT_UNKNOWN) + return E_INVALIDARG; + if (FAILED(hr = IWineDXGIAdapter_GetParent(device->adapter, &IID_IDXGIFactory, (void **)&swapchain->factory))) { @@ -2604,6 +2607,9 @@ HRESULT d3d12_swapchain_create(IWineDXGIFactory *factory, ID3D12CommandQueue *qu ID3D12Device *device; HRESULT hr;
+ if (swapchain_desc->Format == DXGI_FORMAT_UNKNOWN) + return DXGI_ERROR_INVALID_CALL; + if (!fullscreen_desc) { memset(&default_fullscreen_desc, 0, sizeof(default_fullscreen_desc));
Hi,
While running your changed tests on Windows, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=48856
Your paranoid android.
=== debian9 (build log) ===
X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig)
=== debian9 (build log) ===
X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig)