fix(diagnostics): log renderer state on each beginFrame for AMD crash

Add per-frame LOG_WARNING with this/vkCtx/camera/postProcess pointers and
msaaChangePending state. If the log prints before crash, the pointer values
tell us what's corrupt. If it doesn't print, crash is in the log itself
(meaning this or vkCtx is corrupt).
This commit is contained in:
Kelsi 2026-04-03 20:37:21 -07:00
parent cd07e23485
commit 45ac7e4d8e

View file

@ -808,6 +808,14 @@ void Renderer::beginFrame() {
if (!vkCtx) return;
if (vkCtx->isDeviceLost()) return;
// Diagnostic: log pointer state to detect corrupt this/members
LOG_WARNING("beginFrame: this=", (void*)this,
" vkCtx=", (void*)vkCtx,
" msaaP=", msaaChangePending_,
" ppPipe=", (void*)postProcessPipeline_.get(),
" cam=", (void*)camera.get(),
" swDirty=", vkCtx->isSwapchainDirty());
// Apply deferred MSAA change between frames (before any rendering state is used)
g_crashRenderPhase = "bf:msaa";
if (msaaChangePending_) {