|
|
@@ -234,6 +234,14 @@ CLP(ShaderContext)(CLP(GraphicsStateGuardian) *glgsg, Shader *s) : ShaderContext
|
|
|
}
|
|
|
|
|
|
if (p > -1) {
|
|
|
+ // Some NVidia drivers (361.43 for example) (incorrectly) include "internal" uniforms in
|
|
|
+ // the list starting with "_main_" (for example, "_main_0_gp5fp[0]")
|
|
|
+ // we need to skip those, because we don't know anything about them
|
|
|
+ if (strncmp(param_name_cstr, "_main_", 6) == 0) {
|
|
|
+ GLCAT.warning() << "Ignoring uniform " << param_name << " which may be generated by buggy Nvidia driver.\n";
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+
|
|
|
// Strip off [0] suffix that some drivers append to arrays.
|
|
|
size_t size = param_name.size();
|
|
|
if (size > 3 && param_name.substr(size - 3, 3) == "[0]") {
|