![]() |
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 |
Re: Updating Uniforms with 9746
|
Re: Updating Uniforms with 9746
1 Attachment(s)
Quote:
|
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 |
Re: Updating Uniforms with 9746
Quote:
|
Re: Updating Uniforms with 9746
Quote:
Are you able to compile OpenSceneGraph (version 1.2) code? I might have a test case for you.. |
Re: Updating Uniforms with 9746
Once you provide a test case, I'll look into building OpenSceneGraph.
Thanks, Lonni |
Re: Updating Uniforms with 9746
2 Attachment(s)
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. |
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 |
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. |
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.
|
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? |
| All times are GMT -5. The time now is 01:43 AM. |
Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Copyright ©1998 - 2013, nV News.