summaryrefslogtreecommitdiff
path: root/drivers/gles3/rasterizer_storage_gles3.cpp
diff options
context:
space:
mode:
authorPouleyKetchoupp <pouleyketchoup@gmail.com>2018-12-24 07:47:41 +0100
committerPouleyKetchoupp <pouleyketchoup@gmail.com>2018-12-30 19:49:55 +0100
commita1160ff8e79252d33465aa615ae8f4a9a66971e5 (patch)
treef626573e063330ae9cfecdea2fecaedafb50db81 /drivers/gles3/rasterizer_storage_gles3.cpp
parent22f8ae67a2518c1cef2f3de6cbc6acd4a1b9838d (diff)
Fixed CurveTexture with GLES3 on Android
Diffstat (limited to 'drivers/gles3/rasterizer_storage_gles3.cpp')
-rw-r--r--drivers/gles3/rasterizer_storage_gles3.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/gles3/rasterizer_storage_gles3.cpp b/drivers/gles3/rasterizer_storage_gles3.cpp
index 2b038fcc0e..ee3d3515f7 100644
--- a/drivers/gles3/rasterizer_storage_gles3.cpp
+++ b/drivers/gles3/rasterizer_storage_gles3.cpp
@@ -632,6 +632,25 @@ void RasterizerStorageGLES3::texture_allocate(RID p_texture, int p_width, int p_
p_flags &= ~VS::TEXTURE_FLAG_MIPMAPS; // no mipies for video
}
+#ifndef GLES_OVER_GL
+ switch (p_format) {
+ case Image::Format::FORMAT_RF:
+ case Image::Format::FORMAT_RGF:
+ case Image::Format::FORMAT_RGBF:
+ case Image::Format::FORMAT_RGBAF:
+ case Image::Format::FORMAT_RH:
+ case Image::Format::FORMAT_RGH:
+ case Image::Format::FORMAT_RGBH:
+ case Image::Format::FORMAT_RGBAH: {
+ if (!config.texture_float_linear_supported) {
+ // disable linear texture filtering when not supported for float format on some devices (issue #24295)
+ p_flags &= ~VS::TEXTURE_FLAG_FILTER;
+ }
+ } break;
+ default: {}
+ }
+#endif
+
Texture *texture = texture_owner.get(p_texture);
ERR_FAIL_COND(!texture);
texture->width = p_width;
@@ -7669,11 +7688,13 @@ void RasterizerStorageGLES3::initialize() {
config.etc2_supported = false;
config.s3tc_supported = true;
config.rgtc_supported = true; //RGTC - core since OpenGL version 3.0
+ config.texture_float_linear_supported = true;
#else
config.etc2_supported = true;
config.hdr_supported = false;
config.s3tc_supported = config.extensions.has("GL_EXT_texture_compression_dxt1") || config.extensions.has("GL_EXT_texture_compression_s3tc") || config.extensions.has("WEBGL_compressed_texture_s3tc");
config.rgtc_supported = config.extensions.has("GL_EXT_texture_compression_rgtc") || config.extensions.has("GL_ARB_texture_compression_rgtc") || config.extensions.has("EXT_texture_compression_rgtc");
+ config.texture_float_linear_supported = config.extensions.has("GL_OES_texture_float_linear");
#endif
config.pvrtc_supported = config.extensions.has("GL_IMG_texture_compression_pvrtc");