GPU: Disable texture filters when dual-source blend is unsupported

This commit is contained in:
Connor McLaughlin
2020-11-10 20:55:35 +10:00
parent 92a4551bb2
commit d468814a6d
2 changed files with 19 additions and 1 deletions

View File

@ -225,6 +225,13 @@ protected:
}
}
/// Returns true if the specified texture filtering mode requires dual-source blending.
ALWAYS_INLINE bool TextureFilterRequiresDualSourceBlend(GPUTextureFilter filter)
{
return (filter == GPUTextureFilter::Bilinear || filter == GPUTextureFilter::JINC2 ||
filter == GPUTextureFilter::xBR);
}
/// Returns true if alpha blending should be enabled for drawing the current batch.
ALWAYS_INLINE bool UseAlphaBlending(TransparencyMode transparency_mode, BatchRenderMode render_mode) const
{