Skip to content

Commit

Permalink
Merge pull request #18433 from joolswills/gles2_astc_fix
Browse files Browse the repository at this point in the history
Fix building on OpenGL ES 2.0 (RPI VideoCore IV)
  • Loading branch information
hrydgard committed Nov 21, 2023
2 parents 3d508ef + 82ce831 commit 3d59db0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Common/GPU/OpenGL/DataFormatGL.cpp
Expand Up @@ -146,12 +146,14 @@ bool Thin3DFormatToGLFormatAndType(DataFormat fmt, GLuint &internalFormat, GLuin
alignment = 16;
break;

#ifdef GL_COMPRESSED_RGBA_ASTC_4x4_KHR
case DataFormat::ASTC_4x4_UNORM_BLOCK:
internalFormat = GL_COMPRESSED_RGBA_ASTC_4x4_KHR;
format = GL_RGBA;
type = GL_FLOAT;
alignment = 16;
break;
#endif

default:
return false;
Expand Down
2 changes: 2 additions & 0 deletions Common/GPU/OpenGL/GLFeatures.cpp
Expand Up @@ -592,7 +592,9 @@ bool CheckGLExtensions() {
for (int i = 0; i < numCompressedFormats; i++) {
switch (compressedFormats[i]) {
case GL_COMPRESSED_RGB8_ETC2: gl_extensions.supportsETC2 = true; break;
#ifdef GL_COMPRESSED_RGBA_ASTC_4x4_KHR
case GL_COMPRESSED_RGBA_ASTC_4x4_KHR: gl_extensions.supportsASTC = true; break;
#endif
#ifndef USING_GLES2
case GL_COMPRESSED_RGBA_S3TC_DXT5_EXT: gl_extensions.supportsBC123 = true; break;
case GL_COMPRESSED_RGBA_BPTC_UNORM: gl_extensions.supportsBC7 = true; break;
Expand Down

0 comments on commit 3d59db0

Please sign in to comment.