• Advertisement
Sign in to follow this  

How to get GLSL assembly

This topic is 4284 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

I'm desperatly trying to get back some assembly code from GLSL. I don't want to tweak it, just see what it looks like to make sure the compiler is good enough. Any idea?

Share this post


Link to post
Share on other sites
Advertisement
microcode is fine as well, I just want *something*.
Is there any vendor tool which would allow me to extract that microcode?

Well, I guess the answer is no, but that's surprising really. GLSL is a real-time language. It can be executed a millions time per frame... I would have liked to have just a tiny little look at what's being compiled behind my back.

So again, if you have any clue...

Share this post


Link to post
Share on other sites
You should know that the "assembly" in the form of ARB_vertex_program code, and DirectX "assembly" shaders, is not actually executed as such on the card, but further optimized and translated by the driver onto whatever the card can actually do.

That being said, you can use the NVIDIA "CG" SDK to compile GLSL code to ARB_vertex_program and ARB_fragment_program opcodes, using the GLSL profile. Note that this measures the NVIDIA CG compiler, not whatever compiler happens to be within your graphics driver, but it's a good first approximation.

Share this post


Link to post
Share on other sites
I guess this is a popular request.

From the shader objects extension:

24) Do we need a way to get object code back, just like the model of C
on host processors?

DISCUSSION: Lots in email on the arb-gl2 mailing list. This is about
lowest-level, machine specific code that may not even be portable within
a family of cards from the same vendor. One main goal is to save
compilation time. There seems to be general consensus that this has
merit.

RESOLUTION: This is an interesting capability to have, but will be
deferred to the next release or could be added as a separate extension.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
If you have a NVIDIA card, then you can use NVemulate. There is a option for writing out txt files with assembly code. /Sperling

Share this post


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

  • Advertisement