Skip to content
Snippets Groups Projects
Verified Commit 3c160032 authored by Tobias Frisch's avatar Tobias Frisch
Browse files

[#82] Stablize the poor child experience

parent 21e6fb98
No related branches found
No related tags found
1 merge request!70Resolve "Voxel cone tracing"
......@@ -136,6 +136,8 @@ namespace vkcv
);
} catch (vk::OutOfDateKHRError e) {
result = vk::Result::eErrorOutOfDateKHR;
} catch (vk::DeviceLostError e) {
result = vk::Result::eErrorDeviceLost;
}
if (result != vk::Result::eSuccess) {
......@@ -367,6 +369,8 @@ namespace vkcv
result = queueManager.getPresentQueue().handle.presentKHR(presentInfo);
} catch (vk::OutOfDateKHRError e) {
result = vk::Result::eErrorOutOfDateKHR;
} catch (vk::DeviceLostError e) {
result = vk::Result::eErrorDeviceLost;
}
if (result != vk::Result::eSuccess) {
......
......@@ -102,9 +102,17 @@ namespace vkcv {
vk::ImageUsageFlags imageUsageFlags = (
vk::ImageUsageFlagBits::eSampled | vk::ImageUsageFlagBits::eTransferDst | vk::ImageUsageFlagBits::eTransferSrc
);
vk::ImageTiling imageTiling = vk::ImageTiling::eOptimal;
if (supportStorage) {
imageUsageFlags |= vk::ImageUsageFlagBits::eStorage;
if (formatProperties.optimalTilingFeatures & vk::FormatFeatureFlagBits::eStorageImage) {
imageTiling = vk::ImageTiling::eLinear;
}
}
if (supportColorAttachment) {
imageUsageFlags |= vk::ImageUsageFlagBits::eColorAttachment;
}
......@@ -135,8 +143,6 @@ namespace vkcv {
imageViewType = vk::ImageViewType::e2D;
}
vk::ImageTiling imageTiling = vk::ImageTiling::eOptimal;
if (!formatProperties.optimalTilingFeatures) {
if (!formatProperties.linearTilingFeatures)
return ImageHandle();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment