[osg-users] Please test OpenSceneGraph-3.6 branch in prep for 3.6.1

Robert Osfield robert.osfield at gmail.com
Wed Apr 25 09:40:56 PDT 2018

Hi Dan & Terry,

Oh boy, that's a classy driver bug.  You would have thought a company
that develops CPU compilers would know how to write a parser that
handles #pragma properly... you really have to try hard to write bad
code to come up with a bug like this.

Head in hands moment...

Given the possible fix is so simple I'm inclined to merge it rather
than just push the problem back on users.  Terry could you modify
OpenSceneGraph-Data/shaders/text.vert and text.frag to make sure that
#pragma lines are all three or less parameters.

If it is a case that a driver update fixes it so that very few
machines out there will ever hit this issue then perhaps just telling
users to update drivers is the thing to do.


On 25 April 2018 at 16:23, Daniel Emminizer, Code 5773
<dan.emminizer at nrl.navy.mil> wrote:
> Hi Terry,
> Hey I might know this one.  Thanks for that additional info about your driver.  Do you mind retesting with a change?
> See references:
> - https://devtalk.nvidia.com/default/topic/971330/opengl/bug-report-crash-in-glcompileshader-if-using-pragma/
> - https://software.intel.com/en-us/forums/graphics-driver-bug-reporting/topic/623485
> - https://github.com/gwaldron/osgearth/issues/1017
> - https://github.com/gwaldron/osgearth/pull/1106
> - https://github.com/gwaldron/osgearth/pull/1100
> There are some older intel drivers that crash on shaders that include pragmas with too many "arguments".  The spec says that pragmas should be ignored.  But testing demonstrates severe problems with several intel drivers over a few years' period where lines like:
> ... could cause a failure.  Breaking it up into separate lines of no more than 2 arguments each works.
> We found that the magic number for drivers is 3 -- once you get over 3 parameters, it starts to break (depending on driver version).  Could you try to edit your text.frag file to change:
> To:
> #pragma import_defines( BACKDROP_COLOR, SHADOW, OUTLINE)
> This breaks it into 2 lines of 3 params each.  If it's the same bug that we encountered, this might fixyour problem.
> Robert, I haven't reported this because we haven't explicitly ran into this same problem with 3.6 and text shaders yet, because we haven't run on those drivers.  Newer drivers do fix the issue.
>  - Dan
> -----Original Message-----
> From: osg-users [mailto:osg-users-bounces at lists.openscenegraph.org] On Behalf Of Terry Welsh
> Sent: Wednesday, April 25, 2018 11:10 AM
> To: osg-users at lists.openscenegraph.org
> Subject: Re: [osg-users] Please test OpenSceneGraph-3.6 branch in prep for 3.6.1
> Looks like I had a graphics driver problem. Originally, I didn't think
> that was the problem because the computer I'm working on has dual
> graphics and it was crashing in Intel graphics mode and AMD graphics
> mode. As it turns out, my dual graphics was broken and running Intel
> graphics the whole time.
> Now that's fixed and both drivers are broken, but at least they're
> broken in different ways :P Sorry for the false alarm.
> - Terry
> P.S. Buy NVidia graphics.
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

More information about the osg-users mailing list