Windows window gutter artifact: VK present mode vs Layered on DXGI Swapchain

I have a VK app that runs on Windows 10. Using NV driver 573.42 and VK API 1.4. PresentMode for this app is FIFO. When I resize the window down I see this gutter effect (image below). I could find anything on the net that would specifically indicate what’s causing that and even less so how to fix it. I then stumbled upon this [Godo post: Use DXGI to present frames rendered by Vulkan on Windows ]( Use DXGI to present frames rendered by Vulkan on Windows · Issue #5692 · godotengine/godot-proposals · GitHub ). Which indicates the possibility to switch in the NV control panel between Native and DGXI mode.

When I do so:

  • Native: gutter effect goes away if I activate

    ``
    VkSwapchainPresentScalingCreateInfoEXT scaling_info = {
    .sType = VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_SCALING_CREATE_INFO_EXT,
    .pNext = NULL,
    .scalingBehavior = VK_PRESENT_SCALING_STRETCH_BIT_EXT,
    .presentGravityX = VK_PRESENT_GRAVITY_CENTERED_BIT_EXT ,
    .presentGravityY = VK_PRESENT_GRAVITY_CENTERED_BIT_EXT ,
    };
    ```

  • DXGI: the gutter effect is here even with VkSwapchainPresentScalingCreateInfoEXT.

This doesn’t make a lot of sense because DXGI is not supposed to go through a redirection surface (BitBlt mode in DWM) and so technically DXGI is supposed to be faster and have less copies involved limiting issues related to the surface and the swapchain images not having the same size.

With my app, when I use PresentMon to look at the stats, DXGI gives me a frame rate that is slower than when I use the native mode which is there again is counter intuitive. As all that stuff happens under the hood for us devs, through the driver, I was hoping that some insiders from NV could shed some lights on the result I get, maybe provide a robust explanation as to why I get this gutter effect (can it be reproduces on your end – happy to provide a minimal example) and if it is expected indeed even with the gravity/stretch modes set.

Forced DXGI presentation is a hack, it’ll never behave as a proper VK on DXGI interop does, and the impact to the frame rates is an expected result of the hack as it adds to cpu overhead.

By the time the DXGI layer has been reached the application has already gone through BitBlt

Hi @SapThePixelFox,

I agree such artifacts shouldn’t be expected when using VK_PRESENT_SCALING_STRETCH_BIT_EXT. I was able to reproduce this behavior on my end as well. We will be taking a look.

Thank you for reporting this issue.

Lionel