This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

glGetProgramBinary unsupported?

When I query the binary, I really get a binary and nothing human readable. I was expecting to see the generated assembly code like how Nvidia returns it. It's really difficult to write a maxFLOPS test without seeing this assembly. Moreover the Midgard architecture is a mixmatch between old school VLIW and scalar so I never know whether scalar or vector MULs are being generated from my code.

Parents
  • The binary format that is returned from glGetProgramBinary is entirely driver dependent and depending on GPU vendor, it can be GPU family dependent as well.

    You're lucky when grabbing the binary results that Nvidia returns because they use ARB assembly for their program binaries. This is human readable because they keep it in ASCII.

    Most other companies will be returning a binary representation that isn't human readable.

    Qualcomm for example returns the program compiled to the native architecture of the GPU, plus a bunch of metadata, and also the original program's sources. They return this "encrypted" with a simple XOR "encryption" to keep it from being human readable.

    Really need either a shader disassembler to disassemble program binaries, or a host shader assembler that outputs the shader source in a human readable fashion.

    Companies tend to dislike divulging any information about the GPU, which includes the ISA that the GPU runs.

    If a fully documented ISA was released from companies it helps enthusiastic individuals with reversing their GPU and writing open source drivers.

    A shader compiler really helps individuals when optimizing for a platform though. AMD's ShaderAnalyzer tool is a good example of a great shader compiler that shows the compiled shader sources and bottlenecks on that particular platform.

    Just my two cents.

Reply
  • The binary format that is returned from glGetProgramBinary is entirely driver dependent and depending on GPU vendor, it can be GPU family dependent as well.

    You're lucky when grabbing the binary results that Nvidia returns because they use ARB assembly for their program binaries. This is human readable because they keep it in ASCII.

    Most other companies will be returning a binary representation that isn't human readable.

    Qualcomm for example returns the program compiled to the native architecture of the GPU, plus a bunch of metadata, and also the original program's sources. They return this "encrypted" with a simple XOR "encryption" to keep it from being human readable.

    Really need either a shader disassembler to disassemble program binaries, or a host shader assembler that outputs the shader source in a human readable fashion.

    Companies tend to dislike divulging any information about the GPU, which includes the ISA that the GPU runs.

    If a fully documented ISA was released from companies it helps enthusiastic individuals with reversing their GPU and writing open source drivers.

    A shader compiler really helps individuals when optimizing for a platform though. AMD's ShaderAnalyzer tool is a good example of a great shader compiler that shows the compiled shader sources and bottlenecks on that particular platform.

    Just my two cents.

Children