[Bug 111097] Can not detect VK_ERROR_OUT_OF_DATE_KHR or VK_SUBOPTIMAL_KHR when window resizing

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Jul 10 00:26:37 UTC 2019


https://bugs.freedesktop.org/show_bug.cgi?id=111097

            Bug ID: 111097
           Summary: Can not detect VK_ERROR_OUT_OF_DATE_KHR or
                    VK_SUBOPTIMAL_KHR when window resizing
           Product: Mesa
           Version: 19.1
          Hardware: x86-64 (AMD64)
                OS: Linux (All)
            Status: NEW
          Severity: normal
          Priority: medium
         Component: Drivers/Vulkan/intel
          Assignee: intel-3d-bugs at lists.freedesktop.org
          Reporter: xing.xu at intel.com
        QA Contact: intel-3d-bugs at lists.freedesktop.org
                CC: jason at jlekstrand.net

When window is resized, vkQueuePresentKHR should return
VK_ERROR_OUT_OF_DATE_KHR.
vkAcquireNextImageKHR should return VK_ERROR_OUT_OF_DATE_KHR ||
VK_SUBOPTIMAL_KHR. 
So that application got a chance to recreate the swap-chain. But on several
Linux HD graphics, it always return VK_SUCESS.

These are detailed in the vulkan
spec(https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/VkResult.html):
“VK_ERROR_OUT_OF_DATE_KHR A surface has changed in such a way that it is no
longer compatible with the swapchain, and further presentation requests using
the swapchain will fail. Applications must query the new surface properties and
recreate their swapchain if they wish to continue presenting to the surface.
VK_SUBOPTIMAL_KHR A swapchain no longer matches the surface properties exactly,
but can still be used to present to the surface successfully."

Reproduce steps:
1. Download angle source and install deps:
git clone https://chromium.googlesource.com/angle/angle
cd angle
python scripts/bootstrap.py
gclient sync
git checkout master
./build/install-build-deps.sh
gn gen out/Release

2.  disable feature 'perFrameWindowSizeQuery' in RendererVk.cpp
+++ b/src/libANGLE/renderer/vulkan/RendererVk.cpp
@@ -1242,7 +1242,7 @@ void RendererVk::initFeatures(const ExtensionNameList
&deviceExtensionNames)
     if (IsIntel(mPhysicalDeviceProperties.vendorID) ||
         (IsWindows() && IsAMD(mPhysicalDeviceProperties.vendorID)))
     {
-        mFeatures.perFrameWindowSizeQuery.enabled = true;
+        mFeatures.perFrameWindowSizeQuery.enabled = false;


If you meet fenceInfo unused error, try patch as below:
--- a/src/libANGLE/renderer/vulkan/ContextVk.cpp
+++ b/src/libANGLE/renderer/vulkan/ContextVk.cpp
@@ -683,9 +683,9 @@ angle::Result ContextVk::submitFrame(const VkSubmitInfo
&submitInfo,
                                        vk::PrimaryCommandBuffer
&&commandBuffer)
 {
        ANGLE_TRACE_EVENT0("gpu.angle", "RendererVk::submitFrame");
-       VkFenceCreateInfo fenceInfo = {};
-       fenceInfo.sType                 = VK_STRUCTURE_TYPE_FENCE_CREATE_INFO;
-       fenceInfo.flags                 = 0;
+       //VkFenceCreateInfo fenceInfo = {};
+       //fenceInfo.sType               = VK_STRUCTURE_TYPE_FENCE_CREATE_INFO;
+       //fenceInfo.flags               = 0;

3.  Build
ninja -C out/Release

4.  Run test case
./out/Release/angle_end2end_tests
--gtest_filter=EGLSurfaceTest.ResizeWindow/ES2_Vulkan_NoFixture

I have reproduced this issue on below platforms:
Mesa 18.0.5/Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated
Graphics Controller (rev 06)/Ubuntu 18.04
Mesa 19.1.1/Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated
Graphics Controller (rev 06)/Ubuntu 18.04
Mesa 19.1.1/Intel I7 7700K/Intel HD Graphics 630 (Kaby Lake GT2)/Ubuntu 19.04

I can not reproduce this on:
OpenGL version string: 4.6.0 NVIDIA 430.26/GeForce GTX 1060/Ubuntu 18.04.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/intel-3d-bugs/attachments/20190710/84a7927e/attachment.html>


More information about the intel-3d-bugs mailing list