From f5365aa0e12fe0ba2acb60a3fcb99126e0428b93 Mon Sep 17 00:00:00 2001 From: lawnjelly Date: Fri, 20 Sep 2019 09:45:51 +0100 Subject: Fix GLES2 skinning where VERTEX_TEXTURE not supported Although the backup USE_SKELETON_SOFTWARE skinning path is currently used when float texture is not supported, the default skinning path still fails when float texture is supported but GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS is 0, i.e. the device cannot read from texture during vertex shader. This PR adds the logic to activate the SKELETON_SOFTWARE path if either of these cases occur, preventing crashes on devices which have this combination of features. --- drivers/gles2/rasterizer_storage_gles2.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/gles2/rasterizer_storage_gles2.h') diff --git a/drivers/gles2/rasterizer_storage_gles2.h b/drivers/gles2/rasterizer_storage_gles2.h index d139697b86..e6cdcac59f 100644 --- a/drivers/gles2/rasterizer_storage_gles2.h +++ b/drivers/gles2/rasterizer_storage_gles2.h @@ -60,7 +60,9 @@ public: bool shrink_textures_x2; bool use_fast_texture_filter; + bool use_skeleton_software; + int max_vertex_texture_image_units; int max_texture_image_units; int max_texture_size; -- cgit v1.2.3