Assembly output of GLSL program

Is it possible to get the output of the compiled GLSL program? I want to know how many instructions were needed to compile a certain program.


“number of instructions” will depend on the hardware used. And don’t imagine that ARB vp/fp are actual hardware instructions. The hardware already changed a lot.

The Nvidia has NVemulate tool which can dump the corresponding vp/fp assembly for linked GLSL programs. If you compile that assembly you may use the vp/fp api to query number of native instructions (I do not know how much precise that information is and what the driver considers a one native instruction). Of course the results of this entire process are valid only for Nvidia cards.

Alternativelly the NVShaderPerf tool also prints (if I remember correctly) resulting assembly for choosen GPU family together with performance related informations for the shader on that GPU. This information is also Nvidia specific.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.