diff options
author | Juan Linietsky <juan@godotengine.org> | 2019-03-07 12:15:10 -0300 |
---|---|---|
committer | Juan Linietsky <juan@godotengine.org> | 2019-03-07 12:16:20 -0300 |
commit | 6cb841edcb1295a4877ed27330f0ba4c049ddafa (patch) | |
tree | a0ece323d1fe1277f1f3af788ecedbcf778fd31a /drivers/gles3 | |
parent | e28e8490120d38f4b8d96c004075c239fce7ef80 (diff) |
Ensure ETC2 textures are ALSO compressed to Po2 when have mipmaps. Fixes #26733
Diffstat (limited to 'drivers/gles3')
-rw-r--r-- | drivers/gles3/rasterizer_storage_gles3.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gles3/rasterizer_storage_gles3.cpp b/drivers/gles3/rasterizer_storage_gles3.cpp index 3a6204b731..1fa4eacd95 100644 --- a/drivers/gles3/rasterizer_storage_gles3.cpp +++ b/drivers/gles3/rasterizer_storage_gles3.cpp @@ -752,7 +752,11 @@ void RasterizerStorageGLES3::texture_set_data(RID p_texture, const Ref<Image> &p if (config.keep_original_textures && !(texture->flags & VS::TEXTURE_FLAG_USED_FOR_STREAMING)) { texture->images.write[p_layer] = p_image; } - +#ifndef GLES_OVER_GL + if (p_image->is_compressed() && p_image->has_mipmaps() && !p_image->is_size_po2()) { + ERR_PRINTS("Texuture '" + texture->path + "' is compressed, has mipmaps but is not of powerf-of-2 size. This does not work on OpenGL ES 3.0."); + } +#endif Image::Format real_format; Ref<Image> img = _get_gl_image_and_format(p_image, p_image->get_format(), texture->flags, real_format, format, internal_format, type, compressed, srgb); |