summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2015-08-21 14:33:17 -0400
committerKonstantin Käfer <mail@kkaefer.com>2015-09-14 15:15:08 +0200
commit6db8e65394838e3269351cf393a8820cea1326a7 (patch)
tree5439249b57d8993c9e7283b31554de2af2d0cfa4 /src
parent9ff66acf61c33c4b073ea44d0932807e9c7632be (diff)
downloadqtlocation-mapboxgl-6db8e65394838e3269351cf393a8820cea1326a7.tar.gz
don't validate the program
it's not in a state where validation always succeeds with all drivers, e.g. because textures might not be attached yet
Diffstat (limited to 'src')
-rw-r--r--src/mbgl/shader/shader.cpp25
1 files changed, 0 insertions, 25 deletions
diff --git a/src/mbgl/shader/shader.cpp b/src/mbgl/shader/shader.cpp
index 1e3df1bbc2..ed4cb729b3 100644
--- a/src/mbgl/shader/shader.cpp
+++ b/src/mbgl/shader/shader.cpp
@@ -67,31 +67,6 @@ Shader::Shader(const char *name_, const GLchar *vertSource, const GLchar *fragSo
}
}
- {
- // Validate program
- GLint status;
- MBGL_CHECK_ERROR(glValidateProgram(program));
-
- MBGL_CHECK_ERROR(glGetProgramiv(program, GL_VALIDATE_STATUS, &status));
- if (status == 0) {
- GLint logLength;
- MBGL_CHECK_ERROR(glGetProgramiv(program, GL_INFO_LOG_LENGTH, &logLength));
- const auto log = std::make_unique<GLchar[]>(logLength);
- if (logLength > 0) {
- MBGL_CHECK_ERROR(glGetProgramInfoLog(program, logLength, &logLength, log.get()));
- Log::Error(Event::Shader, "Program failed to validate: %s", log.get());
- }
-
- MBGL_CHECK_ERROR(glDeleteShader(vertShader));
- vertShader = 0;
- MBGL_CHECK_ERROR(glDeleteShader(fragShader));
- fragShader = 0;
- MBGL_CHECK_ERROR(glDeleteProgram(program));
- program = 0;
- throw util::ShaderException(std::string { "Program " } + name + " failed to link: " + log.get());
- }
- }
-
// Remove the compiled shaders; they are now part of the program.
MBGL_CHECK_ERROR(glDetachShader(program, vertShader));
MBGL_CHECK_ERROR(glDeleteShader(vertShader));