Vulkan validation error cleanups

This commit is contained in:
Henrik Rydgård 2024-07-28 08:08:48 -06:00
parent 0a1cd19afe
commit 144b3a8a98
2 changed files with 10 additions and 6 deletions

View File

@ -780,8 +780,12 @@ VkResult VulkanContext::CreateDevice(int physical_device) {
device_info.pNext = &features2;
features2.features = deviceFeatures_.enabled.standard;
ChainStruct(features2, &deviceFeatures_.enabled.multiview);
ChainStruct(features2, &deviceFeatures_.enabled.presentWait);
ChainStruct(features2, &deviceFeatures_.enabled.presentId);
if (extensionsLookup_.KHR_present_wait) {
ChainStruct(features2, &deviceFeatures_.enabled.presentWait);
}
if (extensionsLookup_.KHR_present_id) {
ChainStruct(features2, &deviceFeatures_.enabled.presentId);
}
if (extensionsLookup_.EXT_provoking_vertex) {
ChainStruct(features2, &deviceFeatures_.enabled.provokingVertex);
}

View File

@ -901,10 +901,6 @@ void VulkanRenderManager::EndCurRenderStep() {
void VulkanRenderManager::BindFramebufferAsRenderTarget(VKRFramebuffer *fb, VKRRenderPassLoadAction color, VKRRenderPassLoadAction depth, VKRRenderPassLoadAction stencil, uint32_t clearColor, float clearDepth, uint8_t clearStencil, const char *tag) {
_dbg_assert_(insideFrame_);
#ifdef _DEBUG
SanityCheckPassesOnAdd();
#endif
// Eliminate dupes (bind of the framebuffer we already are rendering to), instantly convert to a clear if possible.
if (!steps_.empty() && steps_.back()->stepType == VKRStepType::RENDER && steps_.back()->render.framebuffer == fb) {
u32 clearMask = 0;
@ -949,6 +945,10 @@ void VulkanRenderManager::BindFramebufferAsRenderTarget(VKRFramebuffer *fb, VKRR
}
}
#ifdef _DEBUG
SanityCheckPassesOnAdd();
#endif
// More redundant bind elimination.
if (curRenderStep_) {
if (curRenderStep_->commands.empty()) {