From 2d5d5746d1578db95c10229df3e81f33d7f7a765 Mon Sep 17 00:00:00 2001 From: kd-11 Date: Sun, 13 Feb 2022 13:53:17 +0300 Subject: [PATCH] gl: Harmonize format conversion values - Return values that are true to the PS3, not the host. --- rpcs3/Emu/RSX/GL/GLTexture.cpp | 30 ++---------------------------- 1 file changed, 2 insertions(+), 28 deletions(-) diff --git a/rpcs3/Emu/RSX/GL/GLTexture.cpp b/rpcs3/Emu/RSX/GL/GLTexture.cpp index 7b8f3a74b0..190f0397db 100644 --- a/rpcs3/Emu/RSX/GL/GLTexture.cpp +++ b/rpcs3/Emu/RSX/GL/GLTexture.cpp @@ -850,34 +850,8 @@ namespace gl std::pair 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(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)