[osg-users] Shaders and Nvidia 275.33 drivers problem
Hello I have win7 x64 nvidia video card I found strange problem after update to version 275.33 of nvidia drivers. I see artifacts with shaders, i tried to find why. Part of shader uniform variables are not work correctly. i try to debug it with gdebugger and i noticed non-initialized values in part of uniforms. file src/osg/Program.cpp lines 672-673 Code: _extensions-glGetActiveUniform( _glProgramHandle, i, maxLen, 0, size, type, name ); Later i found that names of array variables coming with [0]. example - %name%[0] i tested with 266.58 they coming without [0] as result in _uniformInfoMap[Uniform::getNameID(reinterpret_castconst char*(name))] = ... we recording values with [0]. file src/osg/Program.cpp lines 213 Code: inline void apply(const Uniform uniform) const { GLint location = getUniformLocation(uniform.getNameID()); if (location=0) and here we can't get right location i fix it, please look patch Code: --- a/OpenSceneGraph/src/osg/Uniform.cpp +++ b/OpenSceneGraph/src/osg/Uniform.cpp @@ -611,13 +611,13 @@ unsigned int Uniform::getNameID(const std::string name) static UniformNameIDMap s_uniformNameIDMap; OpenThreads::ScopedLockOpenThreads::Mutex lock(s_mutex_uniformNameIDMap); -UniformNameIDMap::iterator it = s_uniformNameIDMap.find(name); +UniformNameIDMap::iterator it = s_uniformNameIDMap.find(name.substr(0, name.find([))); if (it != s_uniformNameIDMap.end()) { return it-second; } unsigned int id = s_uniformNameIDMap.size(); -s_uniformNameIDMap.insert(UniformNameIDMap::value_type(name, id)); +s_uniformNameIDMap.insert(UniformNameIDMap::value_type(name.substr(0, name.find([)), id)); return id; } But i don't think that is a good solution. Thank you! Cheers, Alexander -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=40201#40201 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Shaders and Nvidia 275.33 drivers problem
The 275.33 Drivers are not good I personally would avoid like the plague, they are causing all sorts of problems for people Gordon Tomlinson System Engineering Consultant Overwatch® An Operating Unit of Textron Systems __ WARNING: Documents that can be viewed, printed or retrieved from this E-Mail may contain technical data whose export is restricted by the Arms Export Control Act (Title 22, U.S.C., Sec 2751, et seq,) or the Export Administration Act of 1979, as amended, Title 50, U.S.C., App. 2401 et seq. and which may not be exported, released or disclosed to non-U.S. persons (i.e. persons who are not U.S. citizens or lawful permanent residents [green card holders]) inside or outside the United States, without first obtaining an export license. Violations of these export laws are subject to severe civil, criminal and administrative penalties. -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Alexander Sinditskiy Sent: Wednesday, June 08, 2011 5:04 AM To: osg-users@lists.openscenegraph.org Subject: [osg-users] Shaders and Nvidia 275.33 drivers problem Hello I have win7 x64 nvidia video card I found strange problem after update to version 275.33 of nvidia drivers. I see artifacts with shaders, i tried to find why. Part of shader uniform variables are not work correctly. i try to debug it with gdebugger and i noticed non-initialized values in part of uniforms. file src/osg/Program.cpp lines 672-673 Code: _extensions-glGetActiveUniform( _glProgramHandle, i, maxLen, 0, size, type, name ); Later i found that names of array variables coming with [0]. example - %name%[0] i tested with 266.58 they coming without [0] as result in _uniformInfoMap[Uniform::getNameID(reinterpret_castconst char*(name))] = ... we recording values with [0]. file src/osg/Program.cpp lines 213 Code: inline void apply(const Uniform uniform) const { GLint location = getUniformLocation(uniform.getNameID()); if (location=0) and here we can't get right location i fix it, please look patch Code: --- a/OpenSceneGraph/src/osg/Uniform.cpp +++ b/OpenSceneGraph/src/osg/Uniform.cpp @@ -611,13 +611,13 @@ unsigned int Uniform::getNameID(const std::string name) static UniformNameIDMap s_uniformNameIDMap; OpenThreads::ScopedLockOpenThreads::Mutex lock(s_mutex_uniformNameIDMap); -UniformNameIDMap::iterator it = s_uniformNameIDMap.find(name); +UniformNameIDMap::iterator it = s_uniformNameIDMap.find(name.substr(0, name.find([))); if (it != s_uniformNameIDMap.end()) { return it-second; } unsigned int id = s_uniformNameIDMap.size(); -s_uniformNameIDMap.insert(UniformNameIDMap::value_type(name, id)); +s_uniformNameIDMap.insert(UniformNameIDMap::value_type(name.substr(0, name.find([)), id)); return id; } But i don't think that is a good solution. Thank you! Cheers, Alexander -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=40201#40201 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Shaders and Nvidia 275.33 drivers problem
Concur. They broke 3DVision (dual OC'd 250's) Transmitter lights up, flashes, then turns off. -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Tomlinson, Gordon Sent: Wednesday, June 08, 2011 5:28 AM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] Shaders and Nvidia 275.33 drivers problem The 275.33 Drivers are not good I personally would avoid like the plague, they are causing all sorts of problems for people Gordon Tomlinson System Engineering Consultant Overwatch® An Operating Unit of Textron Systems __ WARNING: Documents that can be viewed, printed or retrieved from this E-Mail may contain technical data whose export is restricted by the Arms Export Control Act (Title 22, U.S.C., Sec 2751, et seq,) or the Export Administration Act of 1979, as amended, Title 50, U.S.C., App. 2401 et seq. and which may not be exported, released or disclosed to non-U.S. persons (i.e. persons who are not U.S. citizens or lawful permanent residents [green card holders]) inside or outside the United States, without first obtaining an export license. Violations of these export laws are subject to severe civil, criminal and administrative penalties. -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Alexander Sinditskiy Sent: Wednesday, June 08, 2011 5:04 AM To: osg-users@lists.openscenegraph.org Subject: [osg-users] Shaders and Nvidia 275.33 drivers problem Hello I have win7 x64 nvidia video card I found strange problem after update to version 275.33 of nvidia drivers. I see artifacts with shaders, i tried to find why. Part of shader uniform variables are not work correctly. i try to debug it with gdebugger and i noticed non-initialized values in part of uniforms. file src/osg/Program.cpp lines 672-673 Code: _extensions-glGetActiveUniform( _glProgramHandle, i, maxLen, 0, size, type, name ); Later i found that names of array variables coming with [0]. example - %name%[0] i tested with 266.58 they coming without [0] as result in _uniformInfoMap[Uniform::getNameID(reinterpret_castconst char*(name))] = ... we recording values with [0]. file src/osg/Program.cpp lines 213 Code: inline void apply(const Uniform uniform) const { GLint location = getUniformLocation(uniform.getNameID()); if (location=0) and here we can't get right location i fix it, please look patch Code: --- a/OpenSceneGraph/src/osg/Uniform.cpp +++ b/OpenSceneGraph/src/osg/Uniform.cpp @@ -611,13 +611,13 @@ unsigned int Uniform::getNameID(const std::string name) static UniformNameIDMap s_uniformNameIDMap; OpenThreads::ScopedLockOpenThreads::Mutex lock(s_mutex_uniformNameIDMap); -UniformNameIDMap::iterator it = s_uniformNameIDMap.find(name); +UniformNameIDMap::iterator it = s_uniformNameIDMap.find(name.substr(0, name.find([))); if (it != s_uniformNameIDMap.end()) { return it-second; } unsigned int id = s_uniformNameIDMap.size(); -s_uniformNameIDMap.insert(UniformNameIDMap::value_type(name, id)); +s_uniformNameIDMap.insert(UniformNameIDMap::value_type(name.substr(0, name.find([)), id)); return id; } But i don't think that is a good solution. Thank you! Cheers, Alexander -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=40201#40201 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org