Skip to content

Commit

Permalink
Vulkan debug log: Remove some old exclusions, add a new one (for an o…
Browse files Browse the repository at this point in the history
…ld issue)
  • Loading branch information
hrydgard committed Aug 2, 2020
1 parent 6aa3681 commit dee0f3f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
11 changes: 5 additions & 6 deletions Common/Vulkan/VulkanDebug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,12 @@ VKAPI_ATTR VkBool32 VKAPI_CALL VulkanDebugUtilsCallback(

const char *pMessage = pCallbackData->pMessage;

// Apparent bugs around timestamp validation in the validation layers
if (strstr(pMessage, "vkCmdBeginQuery(): VkQueryPool"))
return false;
if (strstr(pMessage, "vkGetQueryPoolResults() on VkQueryPool"))
int messageCode = pCallbackData->messageIdNumber;
if (messageCode == 101294395) {
// UNASSIGNED-CoreValidation-Shader-OutputNotConsumed - benign perf warning
return false;
}

int messageCode = pCallbackData->messageIdNumber;
const char *pLayerPrefix = "";
if (messageSeverity & VK_DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT) {
message << "ERROR(";
Expand All @@ -58,7 +57,7 @@ VKAPI_ATTR VkBool32 VKAPI_CALL VulkanDebugUtilsCallback(
} else if (messageType & VK_DEBUG_UTILS_MESSAGE_TYPE_VALIDATION_BIT_EXT) {
message << "validation";
}
message << ":" << pCallbackData->messageIdNumber << ") " << pMessage << "\n";
message << ":" << messageCode << ") " << pMessage << "\n";

std::string msg = message.str();

Expand Down
4 changes: 3 additions & 1 deletion Common/Vulkan/VulkanMemory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,9 @@ void VulkanPushBuffer::Map() {
}

void VulkanPushBuffer::Unmap() {
_dbg_assert_(writePtr_ != 0);
_dbg_assert_msg_(writePtr_ != nullptr, "VulkanPushBuffer::Unmap: writePtr_ null here means we have a bug (map/unmap mismatch)");
if (!writePtr_)
return;

if ((memoryPropertyMask_ & VK_MEMORY_PROPERTY_HOST_COHERENT_BIT) == 0) {
VkMappedMemoryRange range{ VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE };
Expand Down

0 comments on commit dee0f3f

Please sign in to comment.