Merge pull request #82359 from bitsawer/add_gles3_device_cache_key

Add device info to GLES3 shader cache key hash
This commit is contained in:
Rémi Verschelde 2023-09-26 16:36:57 +02:00
commit 36945dad07
No known key found for this signature in database
GPG Key ID: C3336907360768E1

View File

@ -140,6 +140,14 @@ void ShaderGLES3::_setup(const char *p_vertex_code, const char *p_fragment_code,
tohash.append("[Fragment]");
tohash.append(p_fragment_code ? p_fragment_code : "");
tohash.append("[gl_implementation]");
const char *vendor = (const char *)glGetString(GL_VENDOR);
tohash.append(vendor ? vendor : "unknown");
const char *renderer = (const char *)glGetString(GL_RENDERER);
tohash.append(renderer ? renderer : "unknown");
const char *version = (const char *)glGetString(GL_VERSION);
tohash.append(version ? version : "unknown");
base_sha256 = tohash.as_string().sha256_text();
}