glgsg: change missing Cg attrib error message to debug

This can occur if a variable is optimized out by the GLSL compiler but not by the Cg compiler.  So it should not be reported as an error.

Fixes #417
This commit is contained in:
rdb 2018-10-15 14:09:25 +02:00
parent a765c32bae
commit 70f4c1cd4e
1 changed files with 11 additions and 9 deletions

View File

@ -226,12 +226,14 @@ CLP(CgShaderContext)(CLP(GraphicsStateGuardian) *glgsg, Shader *s) : ShaderConte
if (!resource) {
resource = "unknown";
}
GLCAT.error()
<< "Could not find Cg varying " << cgGetParameterName(p);
if (attribname) {
GLCAT.error(false) << " : " << attribname;
if (GLCAT.is_debug()) {
GLCAT.debug()
<< "Could not find Cg varying " << cgGetParameterName(p);
if (attribname) {
GLCAT.debug(false) << " : " << attribname;
}
GLCAT.debug(false) << " (" << resource << ") in the compiled GLSL program.\n";
}
GLCAT.error(false) << " (" << resource << ") in the compiled GLSL program.\n";
} else if (loc != 0 && bind._id._name == "vtx_position") {
// We really have to bind the vertex position to attribute 0, since
@ -312,10 +314,10 @@ CLP(CgShaderContext)(CLP(GraphicsStateGuardian) *glgsg, Shader *s) : ShaderConte
GLCAT.debug(false)
<< " is bound to a conventional attribute (" << resource << ")\n";
}
}
if (loc == CA_unknown) {
// Suggest fix to developer.
GLCAT.error() << "Try using a different semantic.\n";
if (loc == CA_unknown) {
// Suggest fix to developer.
GLCAT.debug() << "Try using a different semantic.\n";
}
}
#endif