Confirmed. Splitting the pragma line in half fixes the problem on
Intel graphics:

#pragma import_defines( BACKDROP_COLOR, SHADOW, OUTLINE)
#pragma import_defines( SIGNED_DISTANCE_FIELD, TEXTURE_DIMENSION,
GLYPH_DIMENSION)

I'm running on Win7 64-bit, Intel HD Graphics 4000, driver version
10.18.10.4885.
- Terry

On Wed, Apr 25, 2018 at 1:38 PM, Terry Welsh <[email protected]> wrote:
> Thank you, Dan. That is *exactly* the problem I have with the Intel
> graphics driver. This bug affects a driver from September and the new
> one I installed last night. I'll test your workaround when I get home
> tonight and report on it.
>
> (My AMD driver, on the other hand, is a complete mess. It crashes on
> Furmark and pretty much everything else.)
>
> Robert, here is a related suggestion: how about renaming text.vert and
> text.frag to something unique? Maybe osgtext_text.frag? When I first
> tried 3.6.0 all my text was very broken because I already had a
> text.vert and text.frag in my application. It took a while to figure
> out that they were being loaded by osgText::Text even though I had
> disabled them in my own code.
> - Terry
>
>>
>> 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:
>>
>> #pragma import_defines( BACKDROP_COLOR, SHADOW, OUTLINE, 
>> SIGNED_DISTANCE_FIELD, TEXTURE_DIMENSION, GLYPH_DIMENSION)
>>
>> ... 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:
>>
>> #pragma import_defines( BACKDROP_COLOR, SHADOW, OUTLINE, 
>> SIGNED_DISTANCE_FIELD, TEXTURE_DIMENSION, GLYPH_DIMENSION)
>>
>> To:
>>
>> #pragma import_defines( BACKDROP_COLOR, SHADOW, OUTLINE)
>> #pragma import_defines( SIGNED_DISTANCE_FIELD, TEXTURE_DIMENSION, 
>> GLYPH_DIMENSION)
>>
>> 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
>>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to