From 1b149c2bf5d776fce038828c8f1f22b9fe2cdeaf Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Mon, 18 Aug 2014 16:06:53 +0200 Subject: [PATCH] If a tess/compute shader compilation fails, print its type correctly Change-Id: I7536b596b890ed304846572b3068b3e932c0f594 Reviewed-by: Sean Harmer --- src/gui/opengl/qopenglshaderprogram.cpp | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/src/gui/opengl/qopenglshaderprogram.cpp b/src/gui/opengl/qopenglshaderprogram.cpp index 6e85e5eb4b..8c0b3997fe 100644 --- a/src/gui/opengl/qopenglshaderprogram.cpp +++ b/src/gui/opengl/qopenglshaderprogram.cpp @@ -278,16 +278,27 @@ bool QOpenGLShaderPrivate::compile(QOpenGLShader *q) "Fragment", "Vertex", "Geometry", + "Tessellation Control", + "Tessellation Evaluation", + "Compute", "" }; - const char *type = types[3]; - if (shaderType == QOpenGLShader::Fragment) - type = types[0]; - else if (shaderType == QOpenGLShader::Vertex) - type = types[1]; - else if (shaderType == QOpenGLShader::Geometry) - type = types[2]; + const char *type = types[6]; + switch (shaderType) { + case QOpenGLShader::Fragment: + type = types[0]; break; + case QOpenGLShader::Vertex: + type = types[1]; break; + case QOpenGLShader::Geometry: + type = types[2]; break; + case QOpenGLShader::TessellationControl: + type = types[3]; break; + case QOpenGLShader::TessellationEvaluation: + type = types[4]; break; + case QOpenGLShader::Compute: + type = types[5]; break; + } // Get info and source code lengths GLint infoLogLength = 0;