glslinstruction-set

Trouble understanding GPU disassembly


I'm trying to write a raycasting shader in GLSL, and it's being unbearably slow. So I installed AMD's "GPU Shader Analyzer", so I can look at what is actually generated. I've got it from 2 FPS up to 12, but that's still not fantastic.

I feel like I could improve it, but I'm stuck at three points.

Could someone please explain these? I can't find any documentation for the first two, and I don't understand the docs for the last. I've never done any assembly before, unfortunately.


Solution

  • I've found this document and this document describing the assembly language, that explains some of the mnemonics you have found in the assembly.

    At this level, the assembly is very specific to the hardware; since you have used AMD tools, I thought to look for AMD devices documents. I won't be surprised if NVIDIA uses a different instruction set.

    Since you have marked the question with glsl, maybe you are on the wrong way. OpenGL Shading Language is used because portability, since it's an open-industry standard; instead, using assembly you couple the program with a specific graphics card family. For instance, my programs runs on Linux and Windows, and on a wide range of GPUs of NVIDIA, AMD and Intel (it was not easy, but satisfactory).

    If you still want portability, and you are so brave to write GPU assembly, you can implement programs using ARB assembly (vertex and fragment), but I've never tried (and you gave me now a good inspiration to start another journey).