GSTextureCache: Extend Bilinear Upscale to dirty depth

This commit is contained in:
JordanTheToaster 2024-08-03 16:17:20 +01:00 committed by lightningterror
parent f9fbecc783
commit 2d6c687913
1 changed files with 4 additions and 3 deletions

View File

@ -6305,16 +6305,17 @@ void GSTextureCache::Target::Update(bool cannot_scale)
m_rt_alpha_scale = true; m_rt_alpha_scale = true;
} }
ShaderConvert depth_shader = upscaled ? ShaderConvert::RGBA8_TO_FLOAT32_BILN : ShaderConvert::RGBA8_TO_FLOAT32; const bool linear = upscaled && GSConfig.UserHacks_BilinearHack != GSBilinearDirtyMode::ForceNearest;
ShaderConvert depth_shader = linear ? ShaderConvert::RGBA8_TO_FLOAT32_BILN : ShaderConvert::RGBA8_TO_FLOAT32;
if (m_type == DepthStencil && GSLocalMemory::m_psm[m_TEX0.PSM].trbpp != 32) if (m_type == DepthStencil && GSLocalMemory::m_psm[m_TEX0.PSM].trbpp != 32)
{ {
switch (GSLocalMemory::m_psm[m_TEX0.PSM].trbpp) switch (GSLocalMemory::m_psm[m_TEX0.PSM].trbpp)
{ {
case 24: case 24:
depth_shader = upscaled ? ShaderConvert::RGBA8_TO_FLOAT24_BILN : ShaderConvert::RGBA8_TO_FLOAT24; depth_shader = linear ? ShaderConvert::RGBA8_TO_FLOAT24_BILN : ShaderConvert::RGBA8_TO_FLOAT24;
break; break;
case 16: case 16:
depth_shader = upscaled ? ShaderConvert::RGB5A1_TO_FLOAT16_BILN : ShaderConvert::RGB5A1_TO_FLOAT16; depth_shader = linear ? ShaderConvert::RGB5A1_TO_FLOAT16_BILN : ShaderConvert::RGB5A1_TO_FLOAT16;
break; break;
default: default:
break; break;