Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-71029

QVulkanWindow freeze on releaseSwapChain due device lost

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Out of scope
    • Affects Version/s: 5.11.0
    • Fix Version/s: None
    • Component/s: GUI: Vulkan
    • Labels:
      None
    • Platform/s:
      Windows

      Description

      Hi,

      I can't figure out how to troubleshoot Vulkan errors. I am trying to render terrain using tessellation shaders. I am learning from SaschaWillems tutorial for tessellation rendering. I think I am setting some value for rendering pass wrong in MapTile.cpp but unable to find which cause I dont know how to troubleshoot it.

       Whats the problem?

      App freezes on second frameReady call

       Why?

       I think it freezes on this point beyond my access. Because when I do simple qDebug() in QVulkanWindow::

      releaseSwapChainResources it's called just one time, not next time on

      QVulkanWindow: Device lost
      

       Validation layers debug

       

      qt.vulkan: Vulkan init (vulkan-1.dll)
      qt.vulkan: Supported Vulkan instance layers: QVector(QVulkanLayer("VK_LAYER_NV_optimus" 1 1.1.84 "NVIDIA Optimus layer"), QVulkanLayer("VK_LAYER_RENDERDOC_Capture" 0 1.0.0 "Debugging capture layer for RenderDoc"), QVulkanLayer("VK_LAYER_VALVE_steam_overlay" 1 1.1.73 "Steam Overlay Layer"), QVulkanLayer("VK_LAYER_LUNARG_standard_validation" 1 1.0.82 "LunarG Standard Validation Layer"))
      qt.vulkan: Supported Vulkan instance extensions: QVector(QVulkanExtension("VK_KHR_device_group_creation" 1), QVulkanExtension("VK_KHR_external_fence_capabilities" 1), QVulkanExtension("VK_KHR_external_memory_capabilities" 1), QVulkanExtension("VK_KHR_external_semaphore_capabilities" 1), QVulkanExtension("VK_KHR_get_physical_device_properties2" 1), QVulkanExtension("VK_KHR_get_surface_capabilities2" 1), QVulkanExtension("VK_KHR_surface" 25), QVulkanExtension("VK_KHR_win32_surface" 6), QVulkanExtension("VK_EXT_debug_report" 9), QVulkanExtension("VK_EXT_swapchain_colorspace" 3), QVulkanExtension("VK_NV_external_memory_capabilities" 1), QVulkanExtension("VK_EXT_debug_utils" 1))
      qt.vulkan: Enabling Vulkan instance layers: ("VK_LAYER_LUNARG_standard_validation")
      qt.vulkan: Enabling Vulkan instance extensions: ("VK_EXT_debug_report", "VK_KHR_surface", "VK_KHR_win32_surface")
      qt.vulkan: QVulkanWindow init
      qt.vulkan: 1 physical devices
      qt.vulkan: Physical device [0]: name 'GeForce GT 650M' version 416.64.0
      qt.vulkan: Using physical device [0]
      qt.vulkan: queue family 0: flags=0xf count=16 supportsPresent=1
      qt.vulkan: queue family 1: flags=0x4 count=1 supportsPresent=0
      qt.vulkan: Using queue families: graphics = 0 present = 0
      qt.vulkan: Supported device extensions: QVector(QVulkanExtension("VK_KHR_8bit_storage" 1), QVulkanExtension("VK_KHR_16bit_storage" 1), QVulkanExtension("VK_KHR_bind_memory2" 1), QVulkanExtension("VK_KHR_create_renderpass2" 1), QVulkanExtension("VK_KHR_dedicated_allocation" 3), QVulkanExtension("VK_KHR_descriptor_update_template" 1), QVulkanExtension("VK_KHR_device_group" 3), QVulkanExtension("VK_KHR_draw_indirect_count" 1), QVulkanExtension("VK_KHR_driver_properties" 1), QVulkanExtension("VK_KHR_external_fence" 1), QVulkanExtension("VK_KHR_external_fence_win32" 1), QVulkanExtension("VK_KHR_external_memory" 1), QVulkanExtension("VK_KHR_external_memory_win32" 1), QVulkanExtension("VK_KHR_external_semaphore" 1), QVulkanExtension("VK_KHR_external_semaphore_win32" 1), QVulkanExtension("VK_KHR_get_memory_requirements2" 1), QVulkanExtension("VK_KHR_image_format_list" 1), QVulkanExtension("VK_KHR_maintenance1" 2), QVulkanExtension("VK_KHR_maintenance2" 1), QVulkanExtension("VK_KHR_maintenance3" 1), QVulkanExtension("VK_KHR_multiview" 1), QVulkanExtension("VK_KHR_push_descriptor" 2), QVulkanExtension("VK_KHR_relaxed_block_layout" 1), QVulkanExtension("VK_KHR_sampler_mirror_clamp_to_edge" 1), QVulkanExtension("VK_KHR_sampler_ycbcr_conversion" 1), QVulkanExtension("VK_KHR_shader_draw_parameters" 1), QVulkanExtension("VK_KHR_storage_buffer_storage_class" 1), QVulkanExtension("VK_KHR_swapchain" 70), QVulkanExtension("VK_KHR_variable_pointers" 1), QVulkanExtension("VK_KHR_win32_keyed_mutex" 1), QVulkanExtension("VK_EXT_conditional_rendering" 1), QVulkanExtension("VK_EXT_depth_range_unrestricted" 1), QVulkanExtension("VK_EXT_descriptor_indexing" 2), QVulkanExtension("VK_EXT_discard_rectangles" 1), QVulkanExtension("VK_EXT_hdr_metadata" 1), QVulkanExtension("VK_EXT_inline_uniform_block" 1), QVulkanExtension("VK_EXT_shader_subgroup_ballot" 1), QVulkanExtension("VK_EXT_shader_subgroup_vote" 1), QVulkanExtension("VK_EXT_vertex_attribute_divisor" 3), QVulkanExtension("VK_NV_dedicated_allocation" 1), QVulkanExtension("VK_NV_device_diagnostic_checkpoints" 2), QVulkanExtension("VK_NV_external_memory" 1), QVulkanExtension("VK_NV_external_memory_win32" 1), QVulkanExtension("VK_NV_shader_subgroup_partitioned" 1), QVulkanExtension("VK_NV_win32_keyed_mutex" 1), QVulkanExtension("VK_NVX_device_generated_commands" 3), QVulkanExtension("VK_NVX_multiview_per_view_attributes" 1))
      qt.vulkan: Enabling device extensions: QVector(VK_KHR_swapchain)
      qt.vulkan: memtype 0: flags=0x0
      qt.vulkan: memtype 1: flags=0x0
      qt.vulkan: memtype 2: flags=0x0
      qt.vulkan: memtype 3: flags=0x0
      qt.vulkan: memtype 4: flags=0x0
      qt.vulkan: memtype 5: flags=0x0
      qt.vulkan: memtype 6: flags=0x0
      qt.vulkan: memtype 7: flags=0x1
      qt.vulkan: memtype 8: flags=0x1
      qt.vulkan: memtype 9: flags=0x6
      qt.vulkan: memtype 10: flags=0xe
      qt.vulkan: Picked memtype 10 for host visible memory
      qt.vulkan: Picked memtype 7 for device local memory
      qt.vulkan: Color format: 44 Depth-stencil format: 129
      qt.vulkan: Creating new swap chain of 2 buffers, size 600x370
      qt.vulkan: Actual swap chain buffer count: 2 (supportsReadback=1)
      qt.vulkan: Allocating 1027072 bytes for transient image (memtype 8)
      qt.vulkan: Creating new swap chain of 2 buffers, size 600x368
      qt.vulkan: Releasing swapchain
      qt.vulkan: Actual swap chain buffer count: 2 (supportsReadback=1)
      qt.vulkan: Allocating 1027072 bytes for transient image (memtype 8)
      QVulkanWindow: Device lost
      qt.vulkan: Releasing all resources due to device lost
      qt.vulkan: Releasing swapchain
      

      Source code

      Source code rendering just few vertices (working)

      Differences between source codes

      • Moved from Qt math libraries to glm
        Moved from QImage to gli for Texture class
        Added tessellation shaders
        Disabled window sampling
        Rendering terrain using heightmap and texturearray (Added normals and UV)

       

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            lagocs Laszlo Agocs
            Reporter:
            glararan Lukáš Veteška
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes