mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-12-12 14:48:52 +00:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user