[D3D12] Banjo-Kazooie/Tooie top tile clear fix (rendering still broken in Tooie)

This commit is contained in:
Triang3l
2018-08-26 16:45:21 +03:00
parent 91ef453534
commit e819a41300
5 changed files with 45 additions and 30 deletions

View File

@@ -335,20 +335,7 @@ PipelineCache::UpdateStatus PipelineCache::UpdateBlendStateAndRenderTargets(
dirty |= regs.render_targets[i].format != render_targets[i].format;
regs.render_targets[i].format = render_targets[i].format;
}
uint32_t color_mask;
if (pixel_shader != nullptr) {
color_mask = register_file_->values[XE_GPU_REG_RB_COLOR_MASK].u32 & 0xFFFF;
for (uint32_t i = 0; i < 4; ++i) {
// If the pixel shader doesn't write to a render target, writing to it is
// disabled in the blend state. Otherwise, in Halo 3, one important render
// target is destroyed by a shader not writing to one of the outputs.
if (!pixel_shader->writes_color_target(i)) {
color_mask &= ~(0xF << (i * 4));
}
}
} else {
color_mask = 0;
}
uint32_t color_mask = command_processor_->GetCurrentColorMask(pixel_shader);
dirty |= regs.color_mask != color_mask;
regs.color_mask = color_mask;
bool blend_enable =