You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-13 13:31:48 +00:00
Verify gles3 cached shader load successful
This commit is contained in:
@@ -564,6 +564,13 @@ bool ShaderGLES3::_load_from_cache(Version *p_version) {
|
|||||||
specialization.id = glCreateProgram();
|
specialization.id = glCreateProgram();
|
||||||
glProgramBinary(specialization.id, variant_format, variant_bytes.ptr(), variant_bytes.size());
|
glProgramBinary(specialization.id, variant_format, variant_bytes.ptr(), variant_bytes.size());
|
||||||
|
|
||||||
|
GLint link_status = 0;
|
||||||
|
glGetProgramiv(specialization.id, GL_LINK_STATUS, &link_status);
|
||||||
|
if (link_status != GL_TRUE) {
|
||||||
|
WARN_PRINT_ONCE("Failed to load cached shader, recompiling.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
_get_uniform_locations(specialization, p_version);
|
_get_uniform_locations(specialization, p_version);
|
||||||
|
|
||||||
specialization.ok = true;
|
specialization.ok = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user