[Fix] (GL): validate program pipelines by the spec rules in glValidateProgramPipeline and on every pipeline draw

This commit is contained in:
2026-10-12 08:32:49 -04:00
parent e0193f0b3d
commit e98c5b4a6a
4 changed files with 163 additions and 3 deletions
@@ -243,8 +243,8 @@ namespace MobileGL::MG_Impl::GLImpl {
void ValidateProgramPipeline(GLuint pipeline) {
const auto* pipelineObject = TryGetPipeline(pipeline, __func__);
if (!pipelineObject) return;
// Nothing here can fail today: MobileGL links each stage program on its own, so there is no
// cross-stage interface to re-check at validation time. The log stays empty, which GL allows.
(*pipelineObject)->SetValidateStatus(true);
String reason = (*pipelineObject)->FindValidationError(/*requireAnyStage=*/true);
(*pipelineObject)->SetValidateStatus(reason.empty());
(*pipelineObject)->SetInfoLog(Move(reason));
}
} // namespace MobileGL::MG_Impl::GLImpl