video_core: Check DB_SHADER_CONTROL register before performing depth exports (#3588)

The DB_SHADER_CONTROL register has several enable flags which must be set before certain depth exports are enabled.
This commit adds logic to respect the values in this register when performing depth exports, which fixes the regression in earlier versions of KNACK.
I've also renamed DepthBufferControl to DepthShaderControl, since that's closer to the official name for the register.
This commit is contained in:
Stephen Miller
2025-09-13 06:32:24 -05:00
committed by GitHub
parent c885b522db
commit 0bfde1fcde
4 changed files with 12 additions and 4 deletions

View File

@@ -145,7 +145,8 @@ void Translator::ExportDepth(const GcnInst& inst) {
}
} else {
// Components are float32 into separate VGPRS
u32 mask = MaskFromExportFormat(exp.en, runtime_info.fs_info.z_export_format);
u32 mask = MaskFromExportFormat(exp.en & runtime_info.fs_info.mrtz_mask,
runtime_info.fs_info.z_export_format);
for (u32 i = 0; i < 4; i++, mask >>= 1) {
if ((mask & 1) == 0) {
continue;