graphics: log complete per-target state before format resolution

This commit is contained in:
nmzik
2026-10-15 04:18:32 +02:00
parent 2a4ccaa5d5
commit 87d938139d
+23 -4
View File
@@ -874,14 +874,33 @@ void hw_check(const CommandBuffer& buffer) {
log_phase("done"); log_phase("done");
if (graphics_debug_dump_enabled() && RenderTargetMaskHasBoundMrt(buffer)) { 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++) { for (uint32_t i = 0; i < 8; i++) {
const auto& mrt = hw.GetRenderTarget(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 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, i, mrt.base.addr, (hw.GetRenderTargetMask() >> (i * 4u)) & 0x0fu,
static_cast<uint32_t>(mrt.info.format), mrt.attrib2.width + 1, static_cast<uint32_t>(mrt.info.format), static_cast<uint32_t>(mrt.info.channel_type),
mrt.attrib2.height + 1, static_cast<uint32_t>(mrt.attrib3.tile_mode)); static_cast<uint32_t>(mrt.info.channel_order), (sh.m_cbShaderMask >> (i * 4u)) & 0x0fu,
mrt.attrib2.width + 1, mrt.attrib2.height + 1,
static_cast<uint32_t>(mrt.attrib3.tile_mode), static_cast<uint32_t>(bc.enable),
static_cast<uint32_t>(mrt.info.blend_bypass), static_cast<uint32_t>(mrt.info.blend_clamp),
static_cast<uint32_t>(mrt.info.round_mode), mrt.attrib.num_samples,
mrt.attrib.num_fragments,
static_cast<uint32_t>(mrt.info.dcc_compression_enable), mrt.dcc_addr.addr,
static_cast<uint32_t>(mrt.info.cmask_fast_clear_enable), mrt.cmask.addr,
static_cast<uint32_t>(mrt.dcc.dcc_clear_key_enable), mrt.clear_word0.word0,
mrt.clear_word1.word1);
} }
} }
if (rc.depth_clear_enable && hw.GetDepthClearValue() != 0.0f && if (rc.depth_clear_enable && hw.GetDepthClearValue() != 0.0f &&