If a tess/compute shader compilation fails, print its type correctly
Change-Id: I7536b596b890ed304846572b3068b3e932c0f594 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
This commit is contained in:
parent
75b62f3a17
commit
1b149c2bf5
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user