mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-28 13:56:59 +01:00
gpu: centralize depth copy state validation in target resolution
This commit is contained in:
@@ -394,26 +394,20 @@ static void RcPrint(const char* func, const HW::RenderControl& c) {
|
|||||||
|
|
||||||
LOGF("\t depth_clear_enable = %s\n"
|
LOGF("\t depth_clear_enable = %s\n"
|
||||||
"\t stencil_clear_enable = %s\n"
|
"\t stencil_clear_enable = %s\n"
|
||||||
|
"\t copy_depth_to_color = %s\n"
|
||||||
|
"\t copy_stencil_to_color = %s\n"
|
||||||
"\t resummarize_enable = %s\n"
|
"\t resummarize_enable = %s\n"
|
||||||
"\t stencil_compress_disable = %s\n"
|
"\t stencil_compress_disable = %s\n"
|
||||||
"\t depth_compress_disable = %s\n"
|
"\t depth_compress_disable = %s\n"
|
||||||
"\t copy_centroid = %s\n"
|
"\t copy_centroid = %s\n"
|
||||||
"\t copy_sample = %" PRIu8 "\n",
|
"\t copy_sample = %" PRIu8 "\n",
|
||||||
c.depth_clear_enable ? "true" : "false", c.stencil_clear_enable ? "true" : "false",
|
c.depth_clear_enable ? "true" : "false", c.stencil_clear_enable ? "true" : "false",
|
||||||
|
c.copy_depth_to_color ? "true" : "false", c.copy_stencil_to_color ? "true" : "false",
|
||||||
c.resummarize_enable ? "true" : "false", c.stencil_compress_disable ? "true" : "false",
|
c.resummarize_enable ? "true" : "false", c.stencil_compress_disable ? "true" : "false",
|
||||||
c.depth_compress_disable ? "true" : "false", c.copy_centroid ? "true" : "false",
|
c.depth_compress_disable ? "true" : "false", c.copy_centroid ? "true" : "false",
|
||||||
c.copy_sample);
|
c.copy_sample);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void RcCheck(const HW::RenderControl& c) {
|
|
||||||
// EXIT_NOT_IMPLEMENTED(c.depth_clear_enable != false);
|
|
||||||
// EXIT_NOT_IMPLEMENTED(c.stencil_clear_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);
|
|
||||||
EXIT_NOT_IMPLEMENTED(c.copy_sample != 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void McPrint(const char* func, const HW::ModeControl& c) {
|
static void McPrint(const char* func, const HW::ModeControl& c) {
|
||||||
LOGF("%s\n", func);
|
LOGF("%s\n", func);
|
||||||
|
|
||||||
@@ -869,9 +863,6 @@ void hw_check(const CommandBuffer& buffer) {
|
|||||||
VpCheck(vp, smc);
|
VpCheck(vp, smc);
|
||||||
log_phase("clip");
|
log_phase("clip");
|
||||||
ClipCheck(c);
|
ClipCheck(c);
|
||||||
log_phase("rc");
|
|
||||||
RcCheck(rc);
|
|
||||||
log_phase("depth");
|
|
||||||
log_phase("mode");
|
log_phase("mode");
|
||||||
McCheck(mc);
|
McCheck(mc);
|
||||||
log_phase("blend");
|
log_phase("blend");
|
||||||
|
|||||||
@@ -298,8 +298,9 @@ void RenderExecutor::ResolveRenderDepthTarget(CommandBuffer& buffer, RenderDepth
|
|||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (rc.copy_depth_to_color || rc.copy_stencil_to_color || rc.copy_centroid ||
|
// Centroid/sample selectors only affect depth/stencil-to-color copies.
|
||||||
rc.copy_sample != 0 || dc.zfunc > static_cast<uint8_t>(vk::CompareOp::eAlways) ||
|
if (rc.copy_depth_to_color || rc.copy_stencil_to_color ||
|
||||||
|
dc.zfunc > static_cast<uint8_t>(vk::CompareOp::eAlways) ||
|
||||||
(!z.depth_view.depth_write_disable && z.z_write_base_addr != z.z_read_base_addr) ||
|
(!z.depth_view.depth_write_disable && z.z_write_base_addr != z.z_read_base_addr) ||
|
||||||
(has_stencil && !z.depth_view.stencil_write_disable &&
|
(has_stencil && !z.depth_view.stencil_write_disable &&
|
||||||
z.stencil_write_base_addr != z.stencil_read_base_addr)) {
|
z.stencil_write_base_addr != z.stencil_read_base_addr)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user