Skip to content

Commit

Permalink
GSTextureCache: Extend Bilinear Upscale to dirty depth
Browse files Browse the repository at this point in the history
  • Loading branch information
JordanTheToaster committed Aug 10, 2024
1 parent c7a5370 commit 4aba82f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pcsx2/GS/Renderers/HW/GSTextureCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6305,16 +6305,17 @@ void GSTextureCache::Target::Update(bool cannot_scale)
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)
{
switch (GSLocalMemory::m_psm[m_TEX0.PSM].trbpp)
{
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;
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;
default:
break;
Expand Down

0 comments on commit 4aba82f

Please sign in to comment.