gametechdev / practicalvulkan Goto Github PK
View Code? Open in Web Editor NEWRepository with code samples for "API without Secrets: The Practical Approach to Vulkan" series of articles.
License: Apache License 2.0
Repository with code samples for "API without Secrets: The Practical Approach to Vulkan" series of articles.
License: Apache License 2.0
I have seen at least at 2 places that the try/catch block are wrong.
In SampleCommon::AcquireImage and SampleCommon::FinishFrame there is something like this.
vk::Result result = vk::Result::eSuccess;
try {
result = GetDevice().acquireNextImageKHR( *current_frame.Swapchain->Handle, 3000000000, *current_frame.FrameResources->ImageAvailableSemaphore, vk::Fence(), ¤t_frame.SwapchainImageIndex );
} catch( ... ) {
if( vk::Result::eErrorOutOfDateKHR == result ) {
OnWindowSizeChanged();
} else {
throw;
}
}
The thing is that if acquireNextImageKHR throw and exception result will never be assigned and in the catch the if statement will always be false. There is a similar issue in FinishFrame and maybe more in the code base.
the solution is to have a catch block like this
catch (const vk::OutOfDateKHRError& /*exception*/)
{
recreateSwapchain();
return;
}
Please check this issue which is causing the sample to crash in case of VK_ERROR_OUT_OF_DATE_KHR in AcquireNextImageKHR.
UNASSIGNED-CoreValidation-DrawState-QueueForwardProgress(ERROR / SPEC): msgNum: 0 - Queue 0x3ece98 is waiting on semaphore 0x9 that has no way to be signaled.
Objects: 1
[0] 0x9, type: 5, name: (null)
Validation(ERROR): msg_code: 0: [ UNASSIGNED-CoreValidation-DrawState-QueueForwardProgress ] Object: 0x9 (Type = 5) | Queue 0x3ece98 is waiting on semaphore 0x9 that has no way to be signaled.
UNASSIGNED-CoreValidation-DrawState-SwapchainImageNotAcquired(ERROR / SPEC): msgNum: 0 - vkQueuePresentKHR: Swapchain image index 2 has not been acquired.
Objects: 1
[0] 0x7f, type: 1000001000, name: (null)
Validation(ERROR): msg_code: 0: [ UNASSIGNED-CoreValidation-State-SwapchainImageNotAcquired ] Object: 0x7f (Type = 27) | vkQueuePresentKHR: Swapchain image index 2 has not been acquired.
Could not present swapchain image
I am using latest 2ee3082 commit.
Currently, Linux version doesn't work. It will be enabled in the future.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.