View Full Version : Instruction number overflow...
04-28-2005, 06:50 AM
With RenderMonkey i've realized a shader and i exceeded the number of ALU, looking on web i've found that my card (radeon 9700) has the possibility to have 64 instruction for fp, but i have found also that QuadroFX for example has possibility to use 65000 instructions in fp, is it possible? is there so much difference?
I think 65000 refers to vertex shaders. NVidia offers 4096 max ALU instructions, same for texture instructions. 1024 parameters and and 32 temporaries. That's all for fragment shaders.
04-28-2005, 08:49 AM
It depends on the GPU.
For 9700, it's 64 ALU + 32 tex = 96
QuadroFX 4000 8196 for ALU and tex (if I'm not mistaken)
Keep in mind that the 9700 is aging and that ATI supported the minimum amount back then.
You need to compare with FX non-quadro series which is 1024.
Big difference but if will reduce performance if you have long shaders.
04-28-2005, 11:26 PM
There are some wrong statements above, but it's really simple.
There are enums to query the maximum number of instructions in the assembly source, for example GL_MAX_PROGRAM_INSTRUCTIONS_ARB in ARB_vertex_shader.
And there is a maximum number of instructions which can be executed which had been added whith looping capabilities.
E.g. GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV in http://oss.sgi.com/projects/ogl-sample/registry/NV/fragment_program2.txt
The first ones give you the implementation dependent(!) maximum instructions inside your assembly code (e.g. 1024, 2048, 4096, 8192).
The other one is the limit for all instructions when running the thing (loops!). That's where the 65535 instructions comes form. If there wouldn't be the limit you could hang the system with an endless loop. If you exceed the limit the program just ends and returns garbage, as there is no way to predict this in advance.
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.