Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Issue in qvulkanwindow.cpp ?
Forum Updated to NodeBB v4.3 + New Features

Issue in qvulkanwindow.cpp ?

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 105 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    patrik777
    wrote on 5 Apr 2025, 17:09 last edited by patrik777 26 days ago
    #1

    I've encountered an issue with QVulkanWindow on Windows that produces validation layer errors. I initially developed a large portion of my Vulkan application on Linux, but when moving to Windows, I started getting validation errors.
    When running my application with Vulkan validation layers enabled, I receive this error:

    vkDebug: vkAcquireNextImageKHR(): Semaphore must not have any pending operations.
    The Vulkan spec states: If semaphore is not VK_NULL_HANDLE, it must not have any uncompleted signal or wait operations pending (https://vulkan.lunarg.com/doc/view/1.4.309.0/windows/antora/spec/latest/chapters/VK_KHR_surface/wsi.html#VUID-vkAcquireNextImageKHR-semaphore-01779)

    To confirm this wasn't an issue with my code, I ran the "hellovulkantriangle" example that ships with Qt, and it produces the same validation error. This suggests the problem is in the Qt Vulkan implementation itself or with how is the class supposed to be used. This is my code, that has same structure as in qt example:

    void BaseGame::startNextFrame()
    {
        vt::Functions *functions = vt::Functions::instance();
        GameEnvironment *gameEnv = GameEnvironment::instance();
        VkCommandBuffer cb = p_instruments->window->currentCommandBuffer();
    
        VkRenderPassBeginInfo p_rpBeginInfo = {};
        p_rpBeginInfo.sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO;
        p_rpBeginInfo.renderPass = p_instruments->window->defaultRenderPass();
        p_rpBeginInfo.framebuffer = p_instruments->window->currentFramebuffer();
        p_rpBeginInfo.renderArea.extent.width = 800;
        p_rpBeginInfo.renderArea.extent.height = 600;
        p_rpBeginInfo.clearValueCount = p_instruments->window->sampleCountFlagBits() > VK_SAMPLE_COUNT_1_BIT ? 3 : 2;
        p_rpBeginInfo.pClearValues = m_clearValues;
    
        p_instruments->devFuncs->vkCmdBeginRenderPass(cb, &p_rpBeginInfo, VK_SUBPASS_CONTENTS_INLINE);
        functions->setViewport(cb, {0, 0},
                               {gameEnv->swapChainImageSize().width(), 800});
        functions->setScissors(cb, {0, 0},
                               {gameEnv->swapChainImageSize().width(), 600});
        p_instruments->devFuncs->vkCmdEndRenderPass(cb);
    
        p_instruments->window->frameReady();
        p_instruments->window->requestUpdate();
    }
    

    Did anybody encounter the same issue as me? What could be a workaround? Thank you.
    Qt version: 6.7.3
    Vulkan version: 1.4.309.0

    1 Reply Last reply
    0

    1/1

    5 Apr 2025, 17:09

    • Login

    • Login or register to search.
    1 out of 1
    • First post
      1/1
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved