Merge pull request #94835 from MileyHollenberg/bugfix-powervr-gpu-crash

Fix crash on powerVR GPUs when a cached shader wasn't loaded in properly
This commit is contained in:
Rémi Verschelde 2024-08-16 10:34:55 +02:00
commit 074d8b0938
No known key found for this signature in database
GPG Key ID: C3336907360768E1
3 changed files with 8 additions and 2 deletions

View File

@ -698,7 +698,8 @@ void ShaderGLES3::_clear_version(Version *p_version) {
void ShaderGLES3::_initialize_version(Version *p_version) {
ERR_FAIL_COND(p_version->variants.size() > 0);
if (shader_cache_dir_valid && _load_from_cache(p_version)) {
bool use_cache = shader_cache_dir_valid && !(feedback_count > 0 && GLES3::Config::get_singleton()->disable_transform_feedback_shader_cache);
if (use_cache && _load_from_cache(p_version)) {
return;
}
p_version->variants.reserve(variant_count);
@ -709,7 +710,7 @@ void ShaderGLES3::_initialize_version(Version *p_version) {
_compile_specialization(spec, i, p_version, specialization_default_mask);
p_version->variants[i].insert(specialization_default_mask, spec);
}
if (shader_cache_dir_valid) {
if (use_cache) {
_save_to_cache(p_version);
}
}

View File

@ -218,6 +218,8 @@ Config::Config() {
//https://github.com/godotengine/godot/issues/92662#issuecomment-2161199477
//disable_particles_workaround = false;
}
} else if (rendering_device_name == "PowerVR Rogue GE8320") {
disable_transform_feedback_shader_cache = true;
}
}

View File

@ -96,6 +96,9 @@ public:
bool disable_particles_workaround = false; // set to 'true' to disable 'GPUParticles'
bool flip_xy_workaround = false;
// PowerVR GE 8320 workaround
bool disable_transform_feedback_shader_cache = false;
#ifdef ANDROID_ENABLED
PFNGLFRAMEBUFFERTEXTUREMULTIVIEWOVRPROC eglFramebufferTextureMultiviewOVR = nullptr;
PFNGLTEXSTORAGE3DMULTISAMPLEPROC eglTexStorage3DMultisample = nullptr;