From 668c9b74e24dd52719b06b8f3a8b7d76691526f8 Mon Sep 17 00:00:00 2001 From: "Matias N. Goldberg" Date: Mon, 21 Oct 2024 15:35:22 -0300 Subject: Fix race conditions in breadcrumbs Adds "--accurate-breadcrumbs" CLI command Additionally, leave out breadcrumbs code in non-debug, non-dev builds. Fix regression introduced in #98388 where command_insert_breadcrumb() is called even in non-debug builds. Fixes #98338 --- servers/rendering/rendering_device_graph.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'servers/rendering/rendering_device_graph.h') diff --git a/servers/rendering/rendering_device_graph.h b/servers/rendering/rendering_device_graph.h index 0534d4ee1e..89eb44494b 100644 --- a/servers/rendering/rendering_device_graph.h +++ b/servers/rendering/rendering_device_graph.h @@ -221,14 +221,18 @@ private: }; struct ComputeInstructionList : InstructionList { +#if defined(DEBUG_ENABLED) || defined(DEV_ENABLED) uint32_t breadcrumb; +#endif }; struct DrawInstructionList : InstructionList { RDD::RenderPassID render_pass; RDD::FramebufferID framebuffer; Rect2i region; +#if defined(DEBUG_ENABLED) || defined(DEV_ENABLED) uint32_t breadcrumb; +#endif LocalVector clear_values; }; @@ -317,7 +321,9 @@ private: RDD::FramebufferID framebuffer; RDD::CommandBufferType command_buffer_type; Rect2i region; +#if defined(DEBUG_ENABLED) || defined(DEV_ENABLED) uint32_t breadcrumb = 0; +#endif uint32_t clear_values_count = 0; _FORCE_INLINE_ RDD::RenderPassClearValue *clear_values() { -- cgit v1.2.3