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

@@ -206,13 +206,14 @@ struct FragmentRuntimeInfo {
std::array<PsInput, 32> inputs;
std::array<PsColorBuffer, MaxColorBuffers> color_buffers;
AmdGpu::Liverpool::ShaderExportFormat z_export_format;
u8 mrtz_mask;
bool dual_source_blending;
bool operator==(const FragmentRuntimeInfo& other) const noexcept {
return std::ranges::equal(color_buffers, other.color_buffers) &&
en_flags.raw == other.en_flags.raw && addr_flags.raw == other.addr_flags.raw &&
num_inputs == other.num_inputs && z_export_format == other.z_export_format &&
dual_source_blending == other.dual_source_blending &&
mrtz_mask == other.mrtz_mask && dual_source_blending == other.dual_source_blending &&
std::ranges::equal(inputs.begin(), inputs.begin() + num_inputs, other.inputs.begin(),
other.inputs.begin() + num_inputs);
}