[fuchsia] boot lockup debugging improvements (flutter/engine#27459)
This commit is contained in:
@@ -607,6 +607,10 @@ void Engine::WarmupSkps(
|
||||
surface_producer.ProduceOffscreenSurface(size).release();
|
||||
if (!skp_warmup_surface) {
|
||||
FML_LOG(ERROR) << "Failed to create offscreen warmup surface";
|
||||
// Tell client that zero shaders were warmed up because warmup failed.
|
||||
if (completion_callback.has_value() && completion_callback.value()) {
|
||||
completion_callback.value()(0);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -680,7 +684,7 @@ void Engine::WarmupSkps(
|
||||
// we want to unblock the dart animation code as soon as the raster
|
||||
// thread is free to enque work, rather than waiting for the GPU work
|
||||
// itself to finish.
|
||||
if (completion_callback) {
|
||||
if (completion_callback.has_value() && completion_callback.value()) {
|
||||
completion_callback.value()(count);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -231,6 +231,8 @@ bool VulkanSurface::AllocateDeviceMemory(
|
||||
const SkISize& size,
|
||||
uint32_t buffer_id) {
|
||||
if (size.isEmpty()) {
|
||||
FML_LOG(ERROR)
|
||||
<< "VulkanSurface: Failed to allocate surface, size is empty";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -367,6 +369,8 @@ bool VulkanSurface::SetupSkiaSurface(sk_sp<GrDirectContext> context,
|
||||
);
|
||||
|
||||
if (!sk_surface || sk_surface->getCanvas() == nullptr) {
|
||||
FML_LOG(ERROR)
|
||||
<< "VulkanSurface: SkSurface::MakeFromBackendRenderTarget failed";
|
||||
return false;
|
||||
}
|
||||
sk_surface_ = std::move(sk_surface);
|
||||
@@ -431,8 +435,7 @@ void VulkanSurface::Reset() {
|
||||
if (acquire_event_.signal(ZX_EVENT_SIGNALED, 0u) != ZX_OK ||
|
||||
release_event_.signal(ZX_EVENT_SIGNALED, 0u) != ZX_OK) {
|
||||
valid_ = false;
|
||||
FML_DLOG(ERROR)
|
||||
<< "Could not reset fences. The surface is no longer valid.";
|
||||
FML_LOG(ERROR) << "Could not reset fences. The surface is no longer valid.";
|
||||
}
|
||||
|
||||
VkFence fence = command_buffer_fence_;
|
||||
@@ -451,7 +454,7 @@ void VulkanSurface::Reset() {
|
||||
acquire_semaphore_.Reset();
|
||||
acquire_semaphore_ = SemaphoreFromEvent(acquire_event_);
|
||||
if (!acquire_semaphore_) {
|
||||
FML_DLOG(ERROR) << "failed to create acquire semaphore";
|
||||
FML_LOG(ERROR) << "failed to create acquire semaphore";
|
||||
}
|
||||
|
||||
wait_.Begin(async_get_default_dispatcher());
|
||||
|
||||
@@ -31,25 +31,17 @@
|
||||
|
||||
#include <vulkan/vulkan.h>
|
||||
|
||||
#ifndef NDEBUG
|
||||
|
||||
#define VK_CALL_LOG_ERROR(expression) \
|
||||
({ \
|
||||
__typeof__(expression) _rc = (expression); \
|
||||
if (_rc != VK_SUCCESS) { \
|
||||
FML_DLOG(INFO) << "Vulkan call '" << #expression \
|
||||
<< "' failed with error " \
|
||||
<< vulkan::VulkanResultToString(_rc); \
|
||||
} \
|
||||
_rc; \
|
||||
#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; \
|
||||
})
|
||||
|
||||
#else // NDEBUG
|
||||
|
||||
#define VK_CALL_LOG_ERROR(expression) (expression)
|
||||
|
||||
#endif // NDEBUG
|
||||
|
||||
namespace vulkan {
|
||||
|
||||
std::string VulkanResultToString(VkResult result);
|
||||
|
||||
Reference in New Issue
Block a user