From fc4591fa4960d384ec39caa9a42f04f4bf4dd3c7 Mon Sep 17 00:00:00 2001
From: Jannik Vogel <email@jannikvogel.de>
Date: Mon, 5 Dec 2016 02:10:12 +0100
Subject: [PATCH] ASSERT that shader was linked successfully

---
 src/video_core/renderer_opengl/gl_shader_util.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/video_core/renderer_opengl/gl_shader_util.cpp b/src/video_core/renderer_opengl/gl_shader_util.cpp
index 9a7a39b952..4da241d83c 100644
--- a/src/video_core/renderer_opengl/gl_shader_util.cpp
+++ b/src/video_core/renderer_opengl/gl_shader_util.cpp
@@ -4,6 +4,7 @@
 
 #include <vector>
 #include <glad/glad.h>
+#include "common/assert.h"
 #include "common/logging/log.h"
 #include "video_core/renderer_opengl/gl_shader_util.h"
 
@@ -87,6 +88,7 @@ GLuint LoadProgram(const char* vertex_shader, const char* fragment_shader) {
         LOG_ERROR(Render_OpenGL, "Vertex shader:\n%s", vertex_shader);
         LOG_ERROR(Render_OpenGL, "Fragment shader:\n%s", fragment_shader);
     }
+    ASSERT_MSG(result == GL_TRUE, "Shader not linked");
 
     glDeleteShader(vertex_shader_id);
     glDeleteShader(fragment_shader_id);
-- 
GitLab