1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-22 10:42:36 +01:00

gl: Harmonize format conversion values

- Return values that are true to the PS3, not the host.
This commit is contained in:
kd-11 2022-02-13 13:53:17 +03:00 committed by kd-11
parent 314b63eebf
commit 2d5d5746d1

View File

@ -850,34 +850,8 @@ namespace gl
std::pair<bool, u32> get_format_convert_flags(GLenum format)
{
switch (format)
{
case GL_R8:
case GL_RG8:
case GL_RGBA8:
return { false, 1 };
case GL_R16:
case GL_RG16:
case GL_RG16F:
case GL_RGB565:
case GL_RGBA16F:
return { true, 2 };
case GL_R32F:
case GL_RGBA32F:
return { true, 4 };
case GL_COMPRESSED_RGBA_S3TC_DXT1_EXT:
case GL_COMPRESSED_RGBA_S3TC_DXT3_EXT:
case GL_COMPRESSED_RGBA_S3TC_DXT5_EXT:
return { false, 4 };
case GL_DEPTH_COMPONENT16:
case GL_DEPTH_COMPONENT32F:
return { true, 2 };
case GL_DEPTH24_STENCIL8:
case GL_DEPTH32F_STENCIL8:
return { true, 4 };
default:
fmt::throw_exception("Unexpected internal format 0x%X", static_cast<u32>(format));
}
const auto texel_width = get_format_texel_width(format);
return { (texel_width > 1), texel_width };
}
bool formats_are_bitcast_compatible(GLenum format1, GLenum format2)