VulkanExamples icon indicating copy to clipboard operation
VulkanExamples copied to clipboard

bugs on resizing windows

Open engineer1109 opened this issue 6 years ago • 6 comments

terminate called after throwing an instance of 'vk::OutOfDateKHRError' what(): vk::Queue::presentKHR: ErrorOutOfDateKHR

Segmentation fault Happens on resizing windows. System : Linux Ubuntu-18.04.2

engineer1109 avatar Aug 21 '19 12:08 engineer1109

swapChain.queuePresent(submitOverlay ? semaphores.overlayComplete : semaphores.renderComplete) is error

engineer1109 avatar Aug 21 '19 13:08 engineer1109

now becomes 50% chance.

terminate called after throwing an instance of 'vk::OutOfDateKHRError' what(): vk::Queue::presentKHR: ErrorOutOfDateKHR

engineer1109 avatar Sep 03 '19 17:09 engineer1109

Yeah, something about my resizing code isn't properly waiting. I'll try to investigate this.

jherico avatar Sep 03 '19 22:09 jherico

@jherico use try catch may avoid it

engineer1109 avatar Sep 04 '19 00:09 engineer1109

@jherico For the triangle sample, I have used this to fix

Code

    try {
        swapChain.queuePresent(semaphores.renderComplete);
    } catch (std::exception e) {
        std::cout<<"error"<<std::endl;
        swapChain.create(size);
    }

engineer1109 avatar Sep 04 '19 15:09 engineer1109

@jherico
Parts of the samples can successfully resize. Like texture3d and viewportarray. Fix bugs with this in vulkanExampleBase.cpp 379 line

cxx code

try { swapChain.queuePresent(submitOverlay ? semaphores.overlayComplete : semaphores.renderComplete); } catch (std::exception e) { swapChain.create(size); }

Still bugs exist with multiview and subpass .etc.

engineer1109 avatar Sep 04 '19 15:09 engineer1109