From 87d938139dc1715416155d39e81e7b4fa806fac4 Mon Sep 17 00:00:00 2001 From: nmzik Date: Thu, 15 Oct 2026 04:18:32 +0200 Subject: [PATCH] graphics: log complete per-target state before format resolution --- src/graphics/host_gpu/renderer/debug.cpp | 27 ++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/src/graphics/host_gpu/renderer/debug.cpp b/src/graphics/host_gpu/renderer/debug.cpp index 8837d6885..40bbbf824 100644 --- a/src/graphics/host_gpu/renderer/debug.cpp +++ b/src/graphics/host_gpu/renderer/debug.cpp @@ -874,14 +874,33 @@ void hw_check(const CommandBuffer& buffer) { log_phase("done"); if (graphics_debug_dump_enabled() && RenderTargetMaskHasBoundMrt(buffer)) { - LOGF("MRT render target mask: 0x%08" PRIx32 "\n", hw.GetRenderTargetMask()); + const auto& sh = hw.GetShaderRegisters(); + LOGF("MRT render target mask: 0x%08" PRIx32 + " export_modes={%u,%u,%u,%u,%u,%u,%u,%u}\n", + hw.GetRenderTargetMask(), sh.target_output_mode[0], sh.target_output_mode[1], + sh.target_output_mode[2], sh.target_output_mode[3], sh.target_output_mode[4], + sh.target_output_mode[5], sh.target_output_mode[6], sh.target_output_mode[7]); for (uint32_t i = 0; i < 8; i++) { const auto& mrt = hw.GetRenderTarget(i); + const auto& bc = hw.GetBlendControl(i); LOGF("\t RT%u addr=0x%010" PRIx64 " mask=0x%x fmt=0x%08" PRIx32 - " width=%u height=%u tile=%u\n", + " type=%u order=%u shader_mask=0x%x" + " width=%u height=%u tile=%u blend=%u bypass=%u clamp=%u round_mode=%u" + " samples=%u fragments=%u dcc=%u dcc_addr=0x%010" PRIx64 + " cmask_clear=%u cmask_addr=0x%010" PRIx64 + " dcc_clear_key=%u clear={%08" PRIx32 ",%08" PRIx32 "}\n", i, mrt.base.addr, (hw.GetRenderTargetMask() >> (i * 4u)) & 0x0fu, - static_cast(mrt.info.format), mrt.attrib2.width + 1, - mrt.attrib2.height + 1, static_cast(mrt.attrib3.tile_mode)); + static_cast(mrt.info.format), static_cast(mrt.info.channel_type), + static_cast(mrt.info.channel_order), (sh.m_cbShaderMask >> (i * 4u)) & 0x0fu, + mrt.attrib2.width + 1, mrt.attrib2.height + 1, + static_cast(mrt.attrib3.tile_mode), static_cast(bc.enable), + static_cast(mrt.info.blend_bypass), static_cast(mrt.info.blend_clamp), + static_cast(mrt.info.round_mode), mrt.attrib.num_samples, + mrt.attrib.num_fragments, + static_cast(mrt.info.dcc_compression_enable), mrt.dcc_addr.addr, + static_cast(mrt.info.cmask_fast_clear_enable), mrt.cmask.addr, + static_cast(mrt.dcc.dcc_clear_key_enable), mrt.clear_word0.word0, + mrt.clear_word1.word1); } } if (rc.depth_clear_enable && hw.GetDepthClearValue() != 0.0f &&