Merge pull request #13210 from SamGondelman/macSkybox

Mac: render unsupported BPTC textures as uncompressed
This commit is contained in:
John Conklin II 2018-05-24 14:52:11 -07:00 committed by GitHub
commit caee987d96
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View file

@ -31,6 +31,10 @@ bool GL41Backend::supportedTextureFormat(const gpu::Element& format) {
case gpu::Semantic::COMPRESSED_EAC_RED_SIGNED:
case gpu::Semantic::COMPRESSED_EAC_XY:
case gpu::Semantic::COMPRESSED_EAC_XY_SIGNED:
// The ARB_texture_compression_bptc extension is not supported on 4.1
// See https://www.g-truc.net/doc/OpenGL%204%20Hardware%20Matrix.pdf
case gpu::Semantic::COMPRESSED_BC6_RGB:
case gpu::Semantic::COMPRESSED_BC7_SRGBA:
return false;
default:
return true;

View file

@ -33,6 +33,8 @@ using namespace gpu::gl45;
bool GL45Backend::supportedTextureFormat(const gpu::Element& format) {
switch (format.getSemantic()) {
// ETC textures are actually required by the OpenGL spec as of 4.3, but aren't always supported by hardware
// They'll be recompressed by OpenGL, which will be slow or have poor quality, so disable them for now
case gpu::Semantic::COMPRESSED_ETC2_RGB:
case gpu::Semantic::COMPRESSED_ETC2_SRGB:
case gpu::Semantic::COMPRESSED_ETC2_RGB_PUNCHTHROUGH_ALPHA: