From 6d273e4d9c56ce75e4ca3c1e6306b851153ba925 Mon Sep 17 00:00:00 2001 From: nmzik Date: Sun, 16 Aug 2026 04:19:11 +0200 Subject: [PATCH] graphics: accept forced HTile resummarization --- src/graphics/host_gpu/renderer/debug.cpp | 11 -------- .../host_gpu/renderer/depthRenderTarget.cpp | 25 +++++++++---------- tests/ShaderRecompilerComputeTests.cpp | 1 + 3 files changed, 13 insertions(+), 24 deletions(-) diff --git a/src/graphics/host_gpu/renderer/debug.cpp b/src/graphics/host_gpu/renderer/debug.cpp index d4ac21094..58a9dd202 100644 --- a/src/graphics/host_gpu/renderer/debug.cpp +++ b/src/graphics/host_gpu/renderer/debug.cpp @@ -641,17 +641,6 @@ static void RcPrint(const char* func, const HW::RenderControl& c) { static void RcCheck(const HW::RenderControl& c) { // EXIT_NOT_IMPLEMENTED(c.depth_clear_enable != false); // EXIT_NOT_IMPLEMENTED(c.stencil_clear_enable != false); - if ((c.resummarize_enable || c.copy_centroid || c.copy_sample != 0)) { - static std::atomic log_count {0}; - if (log_count.fetch_add(1) < 16) { - LOGF("\t warning: unsupported PS5 render-control metadata state, continuing: " - "resummarize=%s copy_centroid=%s copy_sample=%" PRIu8 "\n", - c.resummarize_enable ? "true" : "false", c.copy_centroid ? "true" : "false", - c.copy_sample); - } - return; - } - EXIT_NOT_IMPLEMENTED(c.resummarize_enable != false); // EXIT_NOT_IMPLEMENTED(c.stencil_compress_disable != false); // EXIT_NOT_IMPLEMENTED(c.depth_compress_disable != false); EXIT_NOT_IMPLEMENTED(c.copy_centroid != false); diff --git a/src/graphics/host_gpu/renderer/depthRenderTarget.cpp b/src/graphics/host_gpu/renderer/depthRenderTarget.cpp index 1ac2e2822..3c04313de 100644 --- a/src/graphics/host_gpu/renderer/depthRenderTarget.cpp +++ b/src/graphics/host_gpu/renderer/depthRenderTarget.cpp @@ -166,19 +166,18 @@ void RenderExecutor::ResolveRenderDepthTarget(uint64_t submit_id, RenderCommandB DepthFatal("invalid depth view: base=%u last=%u", z.depth_view.slice_start, z.depth_view.slice_max); } - if (rc.resummarize_enable || rc.copy_centroid || rc.copy_sample != 0 || - z.z_info.expclear_enabled || z.stencil_info.expclear_enabled || - z.z_info.partially_resident || z.stencil_info.partially_resident || - z.z_info.max_mip_level != 0 || z.depth_view.current_mip_level != 0 || - z.depth_info.addr5_swizzle_mask != 0 || z.depth_info.array_mode != 0 || - z.depth_info.pipe_config != 0 || z.depth_info.bank_width != 0 || - z.depth_info.bank_height != 0 || z.depth_info.macro_tile_aspect != 0 || - z.depth_info.num_banks != 0 || z.htile_surface.linear != 0 || - z.htile_surface.full_cache != 0 || z.htile_surface.htile_uses_preload_win != 0 || - z.htile_surface.preload != 0 || z.htile_surface.prefetch_width != 0 || - z.htile_surface.prefetch_height != 0 || z.htile_surface.dst_outside_zero_to_one != 0 || - z.z_read_base_addr == 0 || z.z_write_base_addr != z.z_read_base_addr || - (z.z_read_base_addr & 0xffffu) != 0 || + if (rc.copy_centroid || rc.copy_sample != 0 || z.z_info.expclear_enabled || + z.stencil_info.expclear_enabled || z.z_info.partially_resident || + z.stencil_info.partially_resident || z.z_info.max_mip_level != 0 || + z.depth_view.current_mip_level != 0 || z.depth_info.addr5_swizzle_mask != 0 || + z.depth_info.array_mode != 0 || z.depth_info.pipe_config != 0 || + z.depth_info.bank_width != 0 || z.depth_info.bank_height != 0 || + z.depth_info.macro_tile_aspect != 0 || z.depth_info.num_banks != 0 || + z.htile_surface.linear != 0 || z.htile_surface.full_cache != 0 || + z.htile_surface.htile_uses_preload_win != 0 || z.htile_surface.preload != 0 || + z.htile_surface.prefetch_width != 0 || z.htile_surface.prefetch_height != 0 || + z.htile_surface.dst_outside_zero_to_one != 0 || z.z_read_base_addr == 0 || + z.z_write_base_addr != z.z_read_base_addr || (z.z_read_base_addr & 0xffffu) != 0 || dc.zfunc > static_cast(vk::CompareOp::eAlways)) { DepthFatal("unsupported depth register state"); } diff --git a/tests/ShaderRecompilerComputeTests.cpp b/tests/ShaderRecompilerComputeTests.cpp index 2729872eb..4313fe2c0 100644 --- a/tests/ShaderRecompilerComputeTests.cpp +++ b/tests/ShaderRecompilerComputeTests.cpp @@ -6910,6 +6910,7 @@ public: phased_depth_control.z_write_enable = true; registers.SetDepthControl(phased_depth_control); HW::RenderControl phased_render_control{}; + phased_render_control.resummarize_enable = true; registers.SetRenderControl(phased_render_control); RenderDepthInfo phased_depth{};