Skip to content

[FIX] Fix false-positive constant buffer unregister errors and noisy log. - #2131

Open
Neloreck wants to merge 1 commit into
OpenXRay:devfrom
xray-forge:dev-fix-constant-buffer-noise
Open

[FIX] Fix false-positive constant buffer unregister errors and noisy log.#2131
Neloreck wants to merge 1 commit into
OpenXRay:devfrom
xray-forge:dev-fix-constant-buffer-noise

Conversation

@Neloreck

@Neloreck Neloreck commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Notes

  • Since the parallel render contexts refactor, dx11ConstantBuffer is registered in exactly one per-context registry, but its destructor attempted to unregister from all R__NUM_CONTEXTS registries. Every destroyed buffer produced guaranteed misses in the remaining registries, flooding the log with thousands of ! ERROR: Failed to find compiled constant buffer lines on level unload and renderer teardown — all false positives. With the owning context tracked, the error can only fire on genuine registry corruption.
  • Removes 6,680 false positive logs from log file that are appended on game shutdown.

Changes

  • Adds m_context_id to dx11ConstantBuffer, stamped by CResourceManager::_CreateConstantBuffer at registration time.
  • Replaces the destructor's all-contexts unregister loop with a single targeted _DeleteConstantBuffer(m_context_id, this) call, guarded by RF_REGISTERED and a VERIFY on the context id.
  • Extends the failed-unregister error message with the buffer name and context id; adds a GetBufferName() accessor.

Links

Introduced as side effect with #1331

@Neloreck Neloreck changed the title [FIX] Fix ffalse-positive constant buffer unregister errors and noisy log. [FIX] Fix false-positive constant buffer unregister errors and noisy log. Aug 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant