Update unbox aborting
... to use GFXSTREAM_ABORT() and to limit the stop-gag from
aosp/2106873 to just unbox_VkFence().
Bug: b/197641643
Test: `launch_cvd --gpu_mode=gfxstream` with ANGLE+Gfxstream VK
Change-Id: I78ba108338c812fdfa516e7d8ddbb3f0af2b6419
diff --git a/stream-servers/vulkan/VkDecoderGlobalState.cpp b/stream-servers/vulkan/VkDecoderGlobalState.cpp
index 2444e4c..40d61ff 100644
--- a/stream-servers/vulkan/VkDecoderGlobalState.cpp
+++ b/stream-servers/vulkan/VkDecoderGlobalState.cpp
@@ -4875,8 +4875,10 @@
type unbox_##type(type boxed) { \
auto elt = sBoxedHandleManager.get((uint64_t)(uintptr_t)boxed); \
if (!elt) { \
- fprintf(stderr, "%s: unbox %p failed, not found\n", __func__, boxed); \
- /*abort();*/ \
+ if constexpr(!std::is_same_v<type, VkFence>) { \
+ GFXSTREAM_ABORT(FatalError(ABORT_REASON_OTHER)) \
+ << "Unbox " << boxed << " failed, not found."; \
+ } \
return VK_NULL_HANDLE; \
} \
return (type)elt->underlying; \
@@ -7667,8 +7669,8 @@
if (!boxed) return boxed; \
auto elt = sBoxedHandleManager.get((uint64_t)(uintptr_t)boxed); \
if (!elt) { \
- fprintf(stderr, "%s: unbox %p failed, not found\n", __func__, boxed); \
- abort(); \
+ GFXSTREAM_ABORT(FatalError(ABORT_REASON_OTHER)) \
+ << "Unbox " << boxed << " failed, not found."; \
return VK_NULL_HANDLE; \
} \
return (type)elt->underlying; \