Shadow of the Tomb raider creates a fullscreen swapchain that exceeds the monitor size by 1 pixel in both dimensions. Buffers for the swapchain must be created with the requested size, and the mismatch between buffers and swapchain causes pixel-wide lines of uninitialized data along the bottom and right display edges. Vulkan allows creation of a swapchain that extends beyond the advertised capabilities, but warns that the results are platform-dependent. However, doing so eliminates the lines.
Signed-off-by: Conor McCarthy cmccarthy@codeweavers.com --- dlls/dxgi/swapchain.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/dlls/dxgi/swapchain.c b/dlls/dxgi/swapchain.c index c76ad1d1..68d8ae42 100644 --- a/dlls/dxgi/swapchain.c +++ b/dlls/dxgi/swapchain.c @@ -1752,16 +1752,18 @@ static HRESULT d3d12_swapchain_create_vulkan_swapchain(struct d3d12_swapchain *s width = swapchain->desc.Width; height = swapchain->desc.Height; width = max(width, surface_caps.minImageExtent.width); - width = min(width, surface_caps.maxImageExtent.width); height = max(height, surface_caps.minImageExtent.height); - height = min(height, surface_caps.maxImageExtent.height);
if (width != swapchain->desc.Width || height != swapchain->desc.Height) { - WARN("Swapchain dimensions %ux%u are not supported (%u-%u x %u-%u).\n", + WARN("Swapchain dimensions %ux%u are not supported (min %ux%u).\n", swapchain->desc.Width, swapchain->desc.Height, - surface_caps.minImageExtent.width, surface_caps.maxImageExtent.width, - surface_caps.minImageExtent.height, surface_caps.maxImageExtent.height); + surface_caps.minImageExtent.width, surface_caps.minImageExtent.height); + } + else if (width > surface_caps.maxImageExtent.width || height > surface_caps.maxImageExtent.height) + { + WARN("Support for swapchain dimensions %ux%u is platform-dependent (max %ux%u).\n", width, height, + surface_caps.maxImageExtent.width, surface_caps.maxImageExtent.height); }
TRACE("Vulkan swapchain extent %ux%u.\n", width, height);
Hi,
While running your changed tests, 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=57051
Your paranoid android.
=== debian10 (32 bit report) ===
Report errors: dxgi:dxgi has unaccounted for skip messages
=== debian10 (32 bit Chinese:China report) ===
dxgi: dxgi.c:2029: Test failed: Got unexpected desktop coordinates (0,0)-(1024,768), expected (0,0)-(1920,1080). dxgi.c:2129: Test failed: Got unexpected desktop coordinates (0,0)-(1024,768), expected (0,0)-(1920,1080). dxgi.c:4614: Test failed: Got unexpected desktop coordinates (0,0)-(1024,768), expected (0,0)-(1920,1080). dxgi.c:2129: Test failed: Got unexpected desktop coordinates (0,0)-(1024,768), expected (0,0)-(1920,1080). dxgi.c:2129: Test failed: Got unexpected desktop coordinates (0,0)-(1024,768), expected (0,0)-(1920,1080). dxgi.c:2129: Test failed: Got unexpected desktop coordinates (0,0)-(1024,768), expected (0,0)-(1920,1080). dxgi.c:2129: Test failed: Got unexpected desktop coordinates (0,0)-(1024,768), expected (0,0)-(1920,1080). dxgi.c:2129: Test failed: Got unexpected desktop coordinates (0,0)-(1024,768), expected (0,0)-(1920,1080). dxgi.c:2129: Test failed: Got unexpected desktop coordinates (0,0)-(1024,768), expected (0,0)-(1920,1080). dxgi.c:2129: Test failed: Got unexpected desktop coordinates (0,0)-(1024,768), expected (0,0)-(1920,1080). dxgi.c:2129: Test failed: Got unexpected desktop coordinates (0,0)-(1024,768), expected (0,0)-(1920,1080). dxgi.c:2129: Test failed: Got unexpected desktop coordinates (0,0)-(1024,768), expected (0,0)-(1920,1080). dxgi.c:2129: Test failed: Got unexpected desktop coordinates (0,0)-(1024,768), expected (0,0)-(1920,1080). dxgi.c:2129: Test failed: Got unexpected desktop coordinates (0,0)-(1024,768), expected (0,0)-(1920,1080). dxgi.c:2129: Test failed: Got unexpected desktop coordinates (0,0)-(1024,768), expected (0,0)-(1920,1080). dxgi.c:2129: Test failed: Got unexpected desktop coordinates (0,0)-(1024,768), expected (0,0)-(1920,1080). dxgi.c:2129: Test failed: Got unexpected desktop coordinates (0,0)-(1024,768), expected (0,0)-(1920,1080). dxgi.c:2129: Test failed: Got unexpected desktop coordinates (0,0)-(1024,768), expected (0,0)-(1920,1080). dxgi.c:2129: Test failed: Got unexpected desktop coordinates (0,0)-(1024,768), expected (0,0)-(1920,1080). dxgi.c:2129: Test failed: Got unexpected desktop coordinates (0,0)-(1024,768), expected (0,0)-(1920,1080). dxgi.c:2129: Test failed: Got unexpected desktop coordinates (0,0)-(1024,768), expected (0,0)-(1920,1080). dxgi.c:2129: Test failed: Got unexpected desktop coordinates (0,0)-(1024,768), expected (0,0)-(1920,1080). dxgi.c:2129: Test failed: Got unexpected desktop coordinates (0,0)-(1024,768), expected (0,0)-(1920,1080). dxgi.c:2129: Test failed: Got unexpected desktop coordinates (0,0)-(1024,768), expected (0,0)-(1920,1080). dxgi.c:2129: Test failed: Got unexpected desktop coordinates (0,0)-(1024,768), expected (0,0)-(1920,1080). dxgi.c:2129: Test failed: Got unexpected desktop coordinates (0,0)-(1024,768), expected (0,0)-(1920,1080). dxgi.c:2129: Test failed: Got unexpected desktop coordinates (0,0)-(1024,768), expected (0,0)-(1920,1080). dxgi.c:2129: Test failed: Got unexpected desktop coordinates (0,0)-(1024,768), expected (0,0)-(1920,1080). dxgi.c:2129: Test failed: Got unexpected desktop coordinates (0,0)-(1024,768), expected (0,0)-(1920,1080). dxgi.c:2129: Test failed: Got unexpected desktop coordinates (0,0)-(1024,768), expected (0,0)-(1920,1080). dxgi.c:2129: Test failed: Got unexpected desktop coordinates (0,0)-(1024,768), expected (0,0)-(1920,1080). dxgi.c:2129: Test failed: Got unexpected desktop coordinates (0,0)-(1024,768), expected (0,0)-(1920,1080). dxgi.c:2129: Test failed: Got unexpected desktop coordinates (0,0)-(1024,768), expected (0,0)-(1920,1080). dxgi.c:2129: Test failed: Got unexpected desktop coordinates (0,0)-(1024,768), expected (0,0)-(1920,1080). dxgi.c:2129: Test failed: Got unexpected desktop coordinates (0,0)-(1024,768), expected (0,0)-(1920,1080). dxgi.c:2129: Test failed: Got unexpected desktop coordinates (0,0)-(1024,768), expected (0,0)-(1920,1080). dxgi.c:2129: Test failed: Got unexpected desktop coordinates (0,0)-(1024,768), expected (0,0)-(1920,1080). dxgi.c:2129: Test failed: Got unexpected desktop coordinates (0,0)-(1024,768), expected (0,0)-(1920,1080). dxgi.c:2129: Test failed: Got unexpected desktop coordinates (0,0)-(1024,768), expected (0,0)-(1920,1080). dxgi.c:2129: Test failed: Got unexpected desktop coordinates (0,0)-(1024,768), expected (0,0)-(1920,1080). dxgi.c:2129: Test failed: Got unexpected desktop coordinates (0,0)-(1024,768), expected (0,0)-(1920,1080). dxgi.c:2129: Test failed: Got unexpected desktop coordinates (0,0)-(1024,768), expected (0,0)-(1920,1080). dxgi.c:2129: Test failed: Got unexpected desktop coordinates (0,0)-(1024,768), expected (0,0)-(1920,1080). dxgi.c:2129: Test failed: Got unexpected desktop coordinates (0,0)-(1024,768), expected (0,0)-(1920,1080). dxgi.c:2129: Test failed: Got unexpected desktop coordinates (0,0)-(1024,768), expected (0,0)-(1920,1080). dxgi.c:2129: Test failed: Got unexpected desktop coordinates (0,0)-(1024,768), expected (0,0)-(1920,1080). dxgi.c:2129: Test failed: Got unexpected desktop coordinates (0,0)-(1024,768), expected (0,0)-(1920,1080). dxgi.c:2129: Test failed: Got unexpected desktop coordinates (0,0)-(1024,768), expected (0,0)-(1920,1080). dxgi.c:2129: Test failed: Got unexpected desktop coordinates (0,0)-(1024,768), expected (0,0)-(1920,1080). dxgi.c:2129: Test failed: Got unexpected desktop coordinates (0,0)-(1024,768), expected (0,0)-(1920,1080). dxgi.c:2129: Test failed: Got unexpected desktop coordinates (0,0)-(1024,768), expected (0,0)-(1920,1080). dxgi.c:2129: Test failed: Got unexpected desktop coordinates (0,0)-(1024,768), expected (0,0)-(1920,1080). dxgi.c:2129: Test failed: Got unexpected desktop coordinates (0,0)-(1024,768), expected (0,0)-(1920,1080). dxgi.c:2129: Test failed: Got unexpected desktop coordinates (0,0)-(1024,768), expected (0,0)-(1920,1080). dxgi.c:2129: Test failed: Got unexpected desktop coordinates (0,0)-(1024,768), expected (0,0)-(1920,1080). dxgi.c:2129: Test failed: Got unexpected desktop coordinates (0,0)-(1024,768), expected (0,0)-(1920,1080). dxgi.c:2129: Test failed: Got unexpected desktop coordinates (0,0)-(1024,768), expected (0,0)-(1920,1080). dxgi.c:2129: Test failed: Got unexpected desktop coordinates (0,0)-(1024,768), expected (0,0)-(1920,1080). dxgi.c:2129: Test failed: Got unexpected desktop coordinates (0,0)-(1024,768), expected (0,0)-(1920,1080). dxgi.c:2129: Test failed: Got unexpected desktop coordinates (0,0)-(1024,768), expected (0,0)-(1920,1080). dxgi.c:2129: Test failed: Got unexpected desktop coordinates (0,0)-(1024,768), expected (0,0)-(1920,1080). dxgi.c:2129: Test failed: Got unexpected desktop coordinates (0,0)-(1024,768), expected (0,0)-(1920,1080). dxgi.c:2129: Test failed: Got unexpected desktop coordinates (0,0)-(1024,768), expected (0,0)-(1920,1080). dxgi.c:2129: Test failed: Got unexpected desktop coordinates (0,0)-(1024,768), expected (0,0)-(1920,1080). dxgi.c:2129: Test failed: Got unexpected desktop coordinates (0,0)-(1024,768), expected (0,0)-(1920,1080). dxgi.c:2129: Test failed: Got unexpected desktop coordinates (0,0)-(1024,768), expected (0,0)-(1920,1080). dxgi.c:1894: Test failed: Got window rect (0,0)-(1024,768), expected (0,0)-(1920,1080). dxgi.c:1894: Test failed: Got client rect (0,0)-(1024,768), expected (0,0)-(1920,1080). dxgi.c:1921: Test failed: Got monitor rect (0,0)-(1024,768), expected (0,0)-(1920,1080). dxgi.c:1934: Test failed: Got monitor rect (0,0)-(1024,768), expected (0,0)-(1920,1080).
Report errors: dxgi:dxgi has unaccounted for skip messages
=== debian10 (build log) ===
X Error of failed request: BadMatch (invalid parameter attributes) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 7 (RRSetScreenSize) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 151 (XFree86-VidModeExtension) Minor opcode of failed request: 10 (XF86VidModeSwitchToMode)
=== debian10 (32 bit WoW report) ===
Report errors: dxgi:dxgi has unaccounted for skip messages
=== debian10 (build log) ===
X Error of failed request: BadMatch (invalid parameter attributes) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 7 (RRSetScreenSize) X Error of failed request: BadMatch (invalid parameter attributes) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 7 (RRSetScreenSize)
On Fri, 27 Sep 2019 at 18:51, Conor McCarthy cmccarthy@codeweavers.com wrote:
Shadow of the Tomb raider creates a fullscreen swapchain that exceeds the monitor size by 1 pixel in both dimensions. Buffers for the swapchain must be created with the requested size, and the mismatch between buffers and swapchain causes pixel-wide lines of uninitialized data along the bottom and right display edges. Vulkan allows creation of a swapchain that extends beyond the advertised capabilities, but warns that the results are platform-dependent. However, doing so eliminates the lines.
The real question though is what happens on Windows. E.g. for d3d9, what happens is that the content is stretched to the window size on Present().
We could make it specific to SotTR and/or one pixel oversize.
On Sat, Sep 28, 2019 at 1:48 AM Henri Verbeet hverbeet@gmail.com wrote:
On Fri, 27 Sep 2019 at 18:51, Conor McCarthy cmccarthy@codeweavers.com wrote:
Shadow of the Tomb raider creates a fullscreen swapchain that exceeds the monitor size by 1 pixel in both dimensions. Buffers for the swapchain
must
be created with the requested size, and the mismatch between buffers and swapchain causes pixel-wide lines of uninitialized data along the bottom and right display edges. Vulkan allows creation of a swapchain that extends beyond the advertised capabilities, but warns that the results
are
platform-dependent. However, doing so eliminates the lines.
The real question though is what happens on Windows. E.g. for d3d9, what happens is that the content is stretched to the window size on Present().
If scaling occurs in D3D12 we'd see the lines on Windows, but instead they are beyond the bottom and right display edges.
On Sat, 28 Sep 2019, 1:48 AM Henri Verbeet hverbeet@gmail.com wrote:
The real question though is what happens on Windows. E.g. for d3d9, what happens is that the content is stretched to the window size on Present().