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
This commit is contained in:
Matias N. Goldberg 2024-10-21 15:35:22 -03:00
parent 533c616cb8
commit 668c9b74e2
9 changed files with 235 additions and 58 deletions

View file

@ -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<RDD::RenderPassClearValue> 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() {