mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-26 04:32:35 +01:00
gl: Fixup
This commit is contained in:
parent
1730708f47
commit
1e375e5210
@ -1566,6 +1566,21 @@ namespace gl
|
||||
m_pitch = compressed_size / height;
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (sized_format)
|
||||
{
|
||||
case GL_DEPTH_COMPONENT16:
|
||||
{
|
||||
m_pitch = width * 2;
|
||||
break;
|
||||
}
|
||||
case GL_DEPTH24_STENCIL8:
|
||||
case GL_DEPTH32F_STENCIL8:
|
||||
{
|
||||
m_pitch = width * 4;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
GLint r, g, b, a;
|
||||
glGetTexLevelParameteriv(query_target, 0, GL_TEXTURE_RED_SIZE, &r);
|
||||
@ -1574,6 +1589,14 @@ namespace gl
|
||||
glGetTexLevelParameteriv(query_target, 0, GL_TEXTURE_ALPHA_SIZE, &a);
|
||||
|
||||
m_pitch = width * (r + g + b + a) / 8;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!m_pitch)
|
||||
{
|
||||
fmt::throw_exception("Unhandled GL format 0x%X" HERE, sized_format);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user