Skip to content

Commit

Permalink
vulkan: fixed deadlock in validation callback, fixed issue with sdk 1…
Browse files Browse the repository at this point in the history
….3.290 validation #948
  • Loading branch information
turanszkij committed Sep 21, 2024
1 parent 68dc949 commit c813335
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 11 deletions.
30 changes: 20 additions & 10 deletions WickedEngine/wiGraphicsDevice_Vulkan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -616,21 +616,13 @@ namespace vulkan_internal
{
ss += "[Vulkan Warning]: ";
ss += callback_data->pMessage;
wi::backlog::post(ss, wi::backlog::LogLevel::Warning);
wi::helper::DebugOut(ss, wi::helper::DebugLevel::Warning);
}
else if (message_severity & VK_DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT)
{
ss += "[Vulkan Error]: ";
ss += callback_data->pMessage;
#if 1
wi::backlog::post(ss, wi::backlog::LogLevel::Error);
#else
OutputDebugStringA(callback_data->pMessage);
OutputDebugStringA("\n");
#endif
//#ifdef _DEBUG
// assert(0);
//#endif // _DEBUG
wi::helper::DebugOut(ss, wi::helper::DebugLevel::Error);
}

return VK_FALSE;
Expand Down Expand Up @@ -7190,6 +7182,24 @@ using namespace vulkan_internal;

const VkDeviceSize zero = {};
vkCmdBindVertexBuffers2(commandlist.GetCommandBuffer(), 0, 1, &nullBuffer, &zero, &zero, &zero);

if (CheckCapability(GraphicsDeviceCapability::VARIABLE_RATE_SHADING))
{
VkExtent2D fragmentSize = {};
fragmentSize.width = 1;
fragmentSize.height = 1;

VkFragmentShadingRateCombinerOpKHR combiner[] = {
VK_FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR,
VK_FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR
};

vkCmdSetFragmentShadingRateKHR(
commandlist.GetCommandBuffer(),
&fragmentSize,
combiner
);
}
}

return cmd;
Expand Down
2 changes: 1 addition & 1 deletion WickedEngine/wiVersion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace wi::version
// minor features, major updates, breaking compatibility changes
const int minor = 71;
// minor bug fixes, alterations, refactors, updates
const int revision = 573;
const int revision = 574;

const std::string version_string = std::to_string(major) + "." + std::to_string(minor) + "." + std::to_string(revision);

Expand Down

0 comments on commit c813335

Please sign in to comment.