mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-10 00:41:26 +12:00
rsx/gl: Hotfix for GL format compatibility check when high precision depth buffers is enabled
This commit is contained in:
parent
ebb9fc7cd9
commit
ee88e7f948
1 changed files with 14 additions and 1 deletions
|
@ -591,7 +591,20 @@ namespace gl
|
||||||
|
|
||||||
if (auto as_rtt = dynamic_cast<gl::render_target*>(tex))
|
if (auto as_rtt = dynamic_cast<gl::render_target*>(tex))
|
||||||
{
|
{
|
||||||
return (GLenum)as_rtt->get_compatible_internal_format() == fmt;
|
const auto rtt_internal_fmt = (GLenum)as_rtt->get_compatible_internal_format();
|
||||||
|
if (rtt_internal_fmt != fmt)
|
||||||
|
{
|
||||||
|
//When high precision Z is enabled, RTT depth surfaces use DEPTH32F instead of DEPTH24
|
||||||
|
if (rtt_internal_fmt == GL_DEPTH32F_STENCIL8 && fmt == GL_DEPTH24_STENCIL8)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//Match
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return (gl::texture::format)fmt == tex->get_internal_format();
|
return (gl::texture::format)fmt == tex->get_internal_format();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue