From ccee938b5193ff90a6fecc1f4635b856a24718bd Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Thu, 5 Mar 2020 17:35:03 +0100 Subject: rhi: vulkan: Silence useless desc.set validation warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is deemed more appropriate than having some time consuming tracking of descriptor types in pools, just to avoid the rare case of attempting a failing vkAllocateDescriptorSets(), which is then always followed by another, successful attempt. Change-Id: I7a3a1d80afe400dc96605a3d6c834e8b2c71143a Reviewed-by: Christian Strømme --- src/gui/rhi/qrhivulkan.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/gui/rhi/qrhivulkan.cpp b/src/gui/rhi/qrhivulkan.cpp index ca913475a5..26c153afff 100644 --- a/src/gui/rhi/qrhivulkan.cpp +++ b/src/gui/rhi/qrhivulkan.cpp @@ -345,6 +345,15 @@ static bool qvk_debug_filter(VkDebugReportFlagsEXT flags, VkDebugReportObjectTyp return true; } + // In certain cases allocateDescriptorSet() will attempt to allocate from a + // pool that does not have enough descriptors of a certain type. This makes + // the validation layer shout. However, this is not an error since we will + // then move on to another pool. If there is a real error, a qWarning + // message is shown by allocateDescriptorSet(), so the validation warning + // does not have any value and is just noise. + if (strstr(pMessage, "VUID-VkDescriptorSetAllocateInfo-descriptorPool-00307")) + return true; + return false; } -- cgit v1.2.3