On Mon, 6 Apr 2020 at 16:25, Zhiyi Zhang <zzhang(a)codeweavers.com> wrote:
+ swapchain_desc.SampleDesc.Count = 1; + swapchain_desc.SampleDesc.Quality = 0; + swapchain_desc.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT; + swapchain_desc.BufferCount = is_d3d12 ? 2 : 1; + swapchain_desc.OutputWindow = CreateWindowA("static", "dxgi_test", 0, 0, 0, 400, 200, 0, 0, 0, 0);
Could we simply use create_window() here? The test doesn't look like it depends on the specifics of the window. Ideally we'd also destroy the window again.
+ modes = heap_calloc(mode_count, sizeof(*modes)); + ok(!!modes, "Adapter %u output %u: Failed to allocate memory.\n", adapter_idx, + output_idx);
I don't mind too much, but we generally simply assume memory allocation succeeds in the tests.