Skip to content

Commit

Permalink
vk: silence inefficient buffer barrier usage validation messages
Browse files Browse the repository at this point in the history
See #743
  • Loading branch information
w23 committed Nov 26, 2024
1 parent ddbad5e commit 7502303
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions ref/vk/vk_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,23 +126,28 @@ VkBool32 VKAPI_PTR debugCallback(
if (Q_strcmp(pCallbackData->pMessageIdName, "VUID-vkMapMemory-memory-00683") == 0)
return VK_FALSE;

// FIXME: remove this when new buffer staging is done, see https://github.com/w23/xash3d-fwgs/issues/743
// For now, ignore a firehose of "inefficient srcStageMask using VK_PIPELINE_STAGE_ALL_COMMANDS_BIT" messages.
if (Q_strcmp(pCallbackData->pMessageIdName, "BestPractices-pipeline-stage-flags-compute") == 0)
return VK_FALSE;

/* if (messageSeverity != VK_DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT) { */
/* gEngine.Con_Printf(S_WARN "Validation: %s\n", pCallbackData->pMessage); */
/* } */

// TODO better messages, not only errors, what are other arguments for, ...
if (messageSeverity == VK_DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT) {
gEngine.Con_Printf(S_ERROR "%s\n", pCallbackData->pMessage);
gEngine.Con_Printf(S_ERROR "vk/dbg: %s\n", pCallbackData->pMessage);
#ifdef _MSC_VER
__debugbreak();
#else
debug_break();
#endif
} else {
if (Q_strcmp(pCallbackData->pMessageIdName, "UNASSIGNED-DEBUG-PRINTF") == 0) {
gEngine.Con_Printf(S_ERROR "%s\n", pCallbackData->pMessage);
gEngine.Con_Printf(S_ERROR "vk/dbg: %s\n", pCallbackData->pMessage);
} else {
gEngine.Con_Printf(S_WARN "%s\n", pCallbackData->pMessage);
gEngine.Con_Printf(S_WARN "vk/dbg: %s\n", pCallbackData->pMessage);
}
}

Expand Down

0 comments on commit 7502303

Please sign in to comment.