Go Back   nV News Forums > Linux Support Forums > NVIDIA Linux

Newegg Daily Deals

Reply
 
Thread Tools
Old 02-26-07, 06:55 AM   #1
Paul1492
Registered User
 
Join Date: Feb 2007
Posts: 25
Default Updating Uniforms with 9746

I'm using a GeForce 6800 with 9746 NVIDIA video drivers (also see the problem with 9604 on a Quadro FX 4400). I'm using OpenSceneGraph 1.2 and newer.

I have my own custom shader with uniforms and I'm seeing occasional large spikes (80-100ms) in draw times after updating a particular uniform. I assume these spikes are because the driver is recompiling my shader. The problem only exists for the first frame after the uniform is changed the first time otherwise things run fine.

I've posted this problem on the OpenSceneGraph mailing list and I was told the problem is probably with the video driver. The thought was that the driver initially was changing the uniforms definition in the shader to constant and then needs to (re)compile the shader once I make my first change to it. This seems strange (if true).

I have other uniforms and they seem to not have this problem. The problem also seems to relate somehow to a texture but I haven't figured out the complete picture yet.

Anybody know what's going on here? I've spent over 2 weeks looking at this and still don't have my hands around the problem.

Here are a few of the links to the issue in the OpenSceneGraph forums:
http://openscenegraph.net/pipermail/...ry/074578.html
http://openscenegraph.net/pipermail/...ry/074580.html


Paul
Paul1492 is offline   Reply With Quote
Old 02-26-07, 11:34 AM   #2
netllama
NVIDIA Corporation
 
Join Date: Dec 2004
Posts: 8,763
Default Re: Updating Uniforms with 9746

Please see:
http://www.nvnews.net/vbulletin/showthread.php?t=46678
netllama is offline   Reply With Quote
Old 02-26-07, 01:31 PM   #3
Paul1492
Registered User
 
Join Date: Feb 2007
Posts: 25
Default Re: Updating Uniforms with 9746

Quote:
Originally Posted by netllama
If you are looking for the nvidia-bug-report.log then here it is..
Attached Files
File Type: gz nvidia-bug-report.log.gz (26.9 KB, 91 views)
Paul1492 is offline   Reply With Quote
Old 02-26-07, 01:36 PM   #4
netllama
NVIDIA Corporation
 
Join Date: Dec 2004
Posts: 8,763
Default Re: Updating Uniforms with 9746

Yes, the bug report is one useful piece of information. I'll also need how to replicate this problem.

Thanks,
Lonni
netllama is offline   Reply With Quote
Old 02-26-07, 01:45 PM   #5
Paul1492
Registered User
 
Join Date: Feb 2007
Posts: 25
Default Re: Updating Uniforms with 9746

Quote:
Originally Posted by netllama
Yes, the bug report is one useful piece of information. I'll also need how to replicate this problem.

Thanks,
Lonni
I've spent over two weeks attempting to isolate the problem but have not been able to do it yet.. All I can say is that the problem seems to be related to a particular uniform... The program is relatively large and so is the fragment shader. Hence I posted here before I pull all my hair out.
Paul1492 is offline   Reply With Quote
Old 02-27-07, 10:53 AM   #6
Paul1492
Registered User
 
Join Date: Feb 2007
Posts: 25
Default Re: Updating Uniforms with 9746

Quote:
Originally Posted by netllama
Yes, the bug report is one useful piece of information. I'll also need how to replicate this problem.

Thanks,
Lonni
Lonni,

Are you able to compile OpenSceneGraph (version 1.2) code? I might have a test case for you..
Paul1492 is offline   Reply With Quote
Old 02-27-07, 10:58 AM   #7
netllama
NVIDIA Corporation
 
Join Date: Dec 2004
Posts: 8,763
Default Re: Updating Uniforms with 9746

Once you provide a test case, I'll look into building OpenSceneGraph.

Thanks,
Lonni
netllama is offline   Reply With Quote
Old 02-27-07, 03:22 PM   #8
Paul1492
Registered User
 
Join Date: Feb 2007
Posts: 25
Default Re: Updating Uniforms with 9746

I'm attaching two files. The TAR file contains the sample case. Look at the README on how to compile and run the program. You must use OSG 1.2 for this example.

Also, previously, I was having problems with Uniforms in OSG and a post 1.2 patch was provided by the OSG people. This was a modification to GLObjectsVisitor.cpp located in OpenSceneGraph/src/osgUtil. I've attached this updated version of GLObjectsVisitor.cpp to this message.

The problem I'm describing is visible with the stock 1.2 OSG as well as the version with this new version of the this file (it works better with the new file but still not good enough).

On my machines, I'm see occasional spikes in draw times (2-3 spikes around 20-35ms). These spikes are all within the first 5 seconds of the program running. Our actual code had much larger spikes, but I'm not sure what is the difference. I'll look into it.

Let me know what you find out.
Attached Files
File Type: gz SlowDraw.tar.gz (25.5 KB, 72 views)
File Type: gz GLObjectsVisitor.cpp.gz (1.3 KB, 80 views)
Paul1492 is offline   Reply With Quote

Old 02-28-07, 05:26 PM   #9
netllama
NVIDIA Corporation
 
Join Date: Dec 2004
Posts: 8,763
Default Re: Updating Uniforms with 9746

I ran through all of your instructions, however I'm not seeing any draw times greater than 10ms. However, its not really clear from your instructions, where I should be seeing the 10ms draw time warning. Would it appear on standard out, or in the rendering window or somewhere else?

I have a few questions:
0) Does this problem persist if you're not using SLI?
1) I see alot of these errors in your bug report:
NVRM: os_map_kernel_space: can't map 0xe0010000, invalid context!
NVRM: Xid (0001:00): 1, Channel 00000000 Method 00000060 Data 0101020c
Do they correspond with running this application and/or the spikes in draw times?

Thanks,
Lonni
netllama is offline   Reply With Quote
Old 02-28-07, 05:44 PM   #10
Paul1492
Registered User
 
Join Date: Feb 2007
Posts: 25
Default Re: Updating Uniforms with 9746

Make sure you replace your stock OSG 1.2 version of include/osg/Drawable with the one I provided. This times the draw times and has a print statement in it that only prints to stderr if the draw time is > 10ms. Make sure you rebuild OSG after making this change. Also, before running my test case, make sure you LD_LIBRARY_PATH points to the OSG .so files you just build. This especially is an issue if there is another version of OSG "install" on the system. You want the LD_LIBRARY_PATH to point to your new libraries.

I believe SLI is enabled on this system but I see the same problem on a system that doesn't have SLI. I don't think the error message you saw correspond to me running the program but I will double check this tomorrow.
Paul1492 is offline   Reply With Quote
Old 02-28-07, 05:51 PM   #11
netllama
NVIDIA Corporation
 
Join Date: Dec 2004
Posts: 8,763
Default Re: Updating Uniforms with 9746

I definitely replaced the stock OSG 1.2 version of include/osg/Drawable with the one you provided, as I built OSG-1.2 first, then looked at your README and kicked myself for having to go through the build process again.
netllama is offline   Reply With Quote
Old 03-01-07, 07:02 AM   #12
Paul1492
Registered User
 
Join Date: Feb 2007
Posts: 25
Default Re: Updating Uniforms with 9746

I have two systems I'm using here:
1) Dual 6800 SLI capable with 9746 driver and single processor dual core.
2) Quadro FX4400 with 9640 (NVPerfKit driver) driver and dual processor, dual core.

Some observations
1. On system 1, I consistently see the problem with and without SLI enabled. I see three draw times around 28ms.
2. On system 2, I consistently see the same problem with 3 long draw times around 23ms.
3. I occasionaly see "Bad Swap" messages on system 2 in my log file but it doesn't happen every time I run the program. When I do see them, they seem to correspond to when I run the program, but not everytime I run it do I see this message.
4) About the "os_map_kernel_space" messages, I could not get them to be produced on system 1.

Some questions:
1) Should I be worried about the "Bad Swap" and "os_map_kernel_space" messages even though they don't seem to be related to my problem? Your README file says to update the driver if we see the Bad Swap messages (We will be upgrading to 9746 shortly).
2) When you run the program, are you sure you have your LD_LIBRARY_PATH set correctly to refer to the OSG libraries you compiled. This isn't an issue if you have no other copied of OSG installed on your system.
3) What type of system are you running on?
Paul1492 is offline   Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error on startx after updating drivers. PktLoss NVIDIA Linux 3 09-24-02 09:58 PM

All times are GMT -5. The time now is 11:14 PM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.