nv2a/gl: Check GL_LINK_STATUS when loading cached shaders

The GL docs indicate that GL_LINK_STATUS will be set to false in cases where
the cached binary cannot be loaded successfully. This seems to be separate
from the listed glGetError failure modes, indicating that both likely need to
be tested.
This commit is contained in:
Erik Abair
2025-12-18 16:11:23 -07:00
committed by GitHub
parent b27f54789c
commit 658f01865f
+9
View File
@@ -324,6 +324,15 @@ bool pgraph_gl_shader_load_from_memory(ShaderBinding *binding)
return false;
}
GLint link_status = GL_FALSE;
glGetProgramiv(gl_program, GL_LINK_STATUS, &link_status);
if (!link_status) {
NV2A_DPRINTF(
"failed to load shader binary from disk: link status is FALSE\n");
glDeleteProgram(gl_program);
return false;
}
glUseProgram(gl_program);
g_free(binding->program);