Jump to content
  • Advertisement
Sign in to follow this  
noviceprogmr84

OpenGL Temporary Register Limit

This topic is 3945 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hey all, I'm currently working on a program, using the OpenGL Shading Language to perform some scientific modeling on the graphics card of my computer. In a recent effort to increase the amount of data passed to the shader program, I added additional textures for reading and writing, and altered the shader source code as necessary, including adding in an extra call for two functions in the fragment shader source. I've checked the max size of my textures possible, and I'm at the limit, so this was the only option available. Unfortunately, when I made these alterations, I received the error message: "Temporary register limit of 32 exceeded; 57 registers needed to compile program" I don't have much experience with this aspect of programming, being mostly a self taught programmer, like how a computer chooses variables for placement in temporary registers. Could someone please explain what this problem is exactly, and any suggestions for fixing this problem? Btw I'm running the shader program on an NVIDIA 7600 GS with the latest driver version Thank you very much, any help is very much appreciated.

Share this post


Link to post
Share on other sites
Advertisement
This shouldn't happen in GLSL...

In GLSL programs should theorically always compile as long as they meet the requirements on uniforms, varyings and samplers (easy to track resources).

In ASM, there are extra requirements as maximum instruction limit, maximum executed instruction, maximum temporaries... If you run out of temporaries there's not much you can do. Maybe try to use more masking/swizzling, the compiler may not be able to figure this out in some cases.
If you use function calls maybe try to declare a correct passing method (in/out/inout), make sure they can be inlined...

So, theorically, GLSL should insulate us from the low-level details (such as not being able to dinamically iterate on arrays on NV4x/G7x) and give software based shaders instead... but it looks like nobody liked this approach and they simply give up.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!