[osg-users] Volume image crash on the latest version of Nvidia driver

Clement.Chu at csiro.au Clement.Chu at csiro.au
Mon Aug 17 00:39:32 PDT 2015


Hi Robert,

  Yes.  I am using 3.2.3 since I got a problem to show image in the center on 3.4 (My program is using MFC).  Then I used 3.2.3.



Regards,
Clement


________________________________________
From: osg-users [osg-users-bounces at lists.openscenegraph.org] on behalf of Robert Osfield [robert.osfield at gmail.com]
Sent: Monday, 17 August 2015 17:06
To: OpenSceneGraph Users
Subject: Re: [osg-users] Volume image crash on the latest version of Nvidia     driver

HI Clement,

Curious... but what I don't understand is how the Intel compiler was progressing on to the if (num_iteration!=num_iterators) as this should only be run on NVidia cards thank to the #idef NVIDIA_Corportion guard around it,

Are you backporting the shaders to 3,2,x?

Robert.

On 17 August 2015 at 07:33, <Clement.Chu at csiro.au<mailto:Clement.Chu at csiro.au>> wrote:
Hi Robert,

   I got funny volume display problem on intel card (it lost some opacity values).  I checked the shader code and I found the problem on handling NaN with using if statement.

Your code is :

                     "    if (num_iterations<min_iterations) num_iterations = min_iterations;\n"
                     "    else if (num_iterations>max_iterations) num_iterations = max_iterations;\n"
                     "    else if (num_iterations!=num_iterations) num_iterations = max_iterations;\n"


   I checked NaN on wiki https://en.wikipedia.org/wiki/NaN.  The non-signaling value won't do standard comparison, so I changed the code as below.

                     "    if (num_iterations!=num_iterations) num_iterations = max_iterations;\n"
                     "    else if (num_iterations<min_iterations) num_iterations = min_iterations;\n"
                     "    else if (num_iterations>max_iterations) num_iterations = max_iterations;\n"

  Check the value whether it is NaN on first condition and it works as normal on intel card now.



Regards,
Clement


________________________________________
From: osg-users [osg-users-bounces at lists.openscenegraph.org<mailto:osg-users-bounces at lists.openscenegraph.org>] on behalf of Robert Osfield [robert.osfield at gmail.com<mailto:robert.osfield at gmail.com>]
Sent: Wednesday, 12 August 2015 23:58
To: OpenSceneGraph Users
Subject: Re: [osg-users] Volume image crash on the latest version of Nvidia     driver

On 12 August 2015 at 14:47, <Clement.Chu at csiro.au<mailto:Clement.Chu at csiro.au<mailto:Clement.Chu at csiro.au>>> wrote:
Hi Robert,

  I have tested on both Intel and Nvidia machines.  The solution works without any issue.  Thanks.

I have applied this fix to OSG-svn/trunk, OSG-3.2.3 and OSG-3.4.0 so we should now be good to go.

Robert.


_______________________________________________
osg-users mailing list
osg-users at lists.openscenegraph.org<mailto:osg-users at lists.openscenegraph.org>
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org




More information about the osg-users mailing list