summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2014-08-18 16:06:53 +0200
committerGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2014-08-18 22:03:40 +0200
commit1b149c2bf5d776fce038828c8f1f22b9fe2cdeaf (patch)
tree220e8b2a2772e8b1f01921279ab07290394a0a3d /src
parent75b62f3a172c277e8b90ef536da354deccb54d24 (diff)
If a tess/compute shader compilation fails, print its type correctly
Change-Id: I7536b596b890ed304846572b3068b3e932c0f594 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src')
-rw-r--r--src/gui/opengl/qopenglshaderprogram.cpp25
1 files 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;