Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion shell/platform/fuchsia/flutter/vulkan_surface.cc
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ void VulkanSurface::Reset() {
VkFence fence = command_buffer_fence_;

if (command_buffer_) {
VK_CALL_LOG_ERROR(vulkan_provider_.vk().WaitForFences(
VK_CALL_LOG_FATAL(vulkan_provider_.vk().WaitForFences(
vulkan_provider_.vk_device(), 1, &fence, VK_TRUE, UINT64_MAX));
command_buffer_.reset();
}
Expand Down
22 changes: 13 additions & 9 deletions vulkan/procs/vulkan_interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,19 @@

#include <vulkan/vulkan.h>

#define VK_CALL_LOG_ERROR(expression) \
({ \
__typeof__(expression) _rc = (expression); \
if (_rc != VK_SUCCESS) { \
FML_LOG(INFO) << "Vulkan call '" << #expression \
<< "' failed with error " \
<< vulkan::VulkanResultToString(_rc); \
} \
_rc; \
#define VK_CALL_LOG_ERROR(expression) VK_CALL_LOG(expression, ERROR)

#define VK_CALL_LOG_FATAL(expression) VK_CALL_LOG(expression, FATAL)

#define VK_CALL_LOG(expression, severity) \
({ \
__typeof__(expression) _rc = (expression); \
if (_rc != VK_SUCCESS) { \
FML_LOG(severity) << "Vulkan call '" << #expression \
<< "' failed with error " \
<< vulkan::VulkanResultToString(_rc); \
} \
_rc; \
})

namespace vulkan {
Expand Down