ES2 crash fix: Don't draw depth if lacking fragment shader depth write.

This commit is contained in:
Henrik Rydgård 2022-10-01 19:06:02 +02:00
parent 16f93a2684
commit 9ec41436d1
2 changed files with 2 additions and 1 deletions

View File

@ -575,7 +575,7 @@ void FramebufferManagerCommon::SetDepthFrameBuffer(bool isClearingDepth) {
// Need to upload the first line of depth buffers, for Burnout Dominator lens flares. See issue #11100 and comments to #16081.
// Might make this more generic and upload the whole depth buffer if we find it's needed for something.
if (newlyUsingDepth) {
if (newlyUsingDepth && draw_->GetDeviceCaps().fragmentShaderDepthWriteSupported) {
// Sanity check the depth buffer pointer.
if (Memory::IsValidRange(currentRenderVfb_->z_address, currentRenderVfb_->width * 2)) {
const u16 *src = (const u16 *)Memory::GetPointerUnchecked(currentRenderVfb_->z_address);

View File

@ -1252,6 +1252,7 @@ void TextureCacheCommon::LoadClut(u32 clutAddr, u32 loadBytes) {
}
}
// To turn off dynamic CLUT (for demonstration or testing purposes), add "false &&" to this check.
if (chosenFramebuffer && chosenFramebuffer->fbo) {
clutRenderAddress_ = bestClutAddress;