LunarG / gfxreconstruct

Graphics API Capture and Replay Tools for Reconstructing Graphics Application Behavior
https://vulkan.lunarg.com/doc/sdk/latest/linux/capture_tools.html
MIT License
414 stars 121 forks source link

vkCreateSwapchainKHR fails #598

Open Fighter19 opened 3 years ago

Fighter19 commented 3 years ago

Trying to replay a replay that has been recorded using apitrace, I ran into following issue:

VUID-VkSwapchainCreateInfoKHR-imageExtent-01274(ERROR / SPEC): msgNum: 2094043421 - Validation Error: [ VUID-VkSwapchainCreateInfoKHR-imageExtent-01274 ] Object 0: handle = 0x5556535d2428, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x7cd0911d | vkCreateSwapchainKHR() called with imageExtent = (1920,1015), which is outside the bounds returned by vkGetPhysicalDeviceSurfaceCapabilitiesKHR(): currentExtent = (1920,1080), minImageExtent = (1920,1080), maxImageExtent = (1920,1080). The Vulkan spec states: imageExtent must be between minImageExtent and maxImageExtent, inclusive, where minImageExtent and maxImageExtent are members of the VkSurfaceCapabilitiesKHR structure returned by vkGetPhysicalDeviceSurfaceCapabilitiesKHR for the surface (https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-imageExtent-01274)
    Objects: 1
        [0] 0x5556535d2428, type: 3, name: NULL
[gfxrecon] FATAL - API call vkCreateSwapchainKHR returned error value VK_ERROR_INITIALIZATION_FAILED that does not match the result from the capture file: VK_SUCCESS.  Replay cannot continue.

My assumption is that the way the window is created by gfxreconstruct differs from the way d3dretrace+wine+dxvk created it . 1015 is the size of the window minus decorations and minus the taskbar. Relevant part of toascii output

bradgrantham-lunarg commented 2 years ago

Can you give us more info on how to reproduce this issue? One possibility would be sharing the apitrace capture file, or better the GFXR capture file. In case that's not possible, can you give a little more detail on how you captured with apitrace, then replayed and captured, then replayed again? It would be very helpful if the program being captured is something we could run here.

Fighter19 commented 2 years ago

I don't think I can legally share the file, but it has been produced as following:

I'm running Ubuntu 18.04 LTS with Steam and Proton Experimental.

I launched Tales of Berseria on Windows in Fullscreen using d3dretrace.

I played back the d3d trace using Wine (Proton) and recorded another trace using gfxreconstruct. The window created by d3dretrace is not fullscreen anymore but appears to be restricted to the visible desktop.

The error log and message indicate that gfxreconstruct tries to get a fullscreen exclusive mode, while d3dretrace tries to get border"full" fullscreen.

My assumption is that the Window passed in vkCreateXlibSurfaceKHR by gfxreconstruct is a fullscreen window, while the window that is passed in vkCreateXlibSurfaceKHR by d3dretrace is not an exclusive fullscreen window.

This is most likely reproducible with any other trace that works with d3dretrace and dxvk in fullscreen (on Windows at the time of recording using d3dtrace).