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

offline shader compiler example?

Dear all,

I want to compare the performance of online shader compiler and offline shader compiler.

I compiled shader source with mali offline shader compiler and the output are two files named *.out.non-prerotate and *.out.prerotate.

However I have difficulties in how to use these two binary file in my opengl es program. I searched examples in mali SDK but there's no example case found.

Is there anyone who has successfully use binary shader in opengl es program? Is there any other references?

Parents
  • You're calling "free(fileContent);" before uploading to glShaderBinary so you've at least got a use-after-free bug there. Move the free after the GL call to avoid that one.

    I suspect one issue is that the driver version on your platform may be different to the version you are compiling for (the shader binary format has changed over time); the offline compiler lets you specify the DDK version in addition to the hardware version - can you check that?

    Cheers,
    Pete

Reply
  • You're calling "free(fileContent);" before uploading to glShaderBinary so you've at least got a use-after-free bug there. Move the free after the GL call to avoid that one.

    I suspect one issue is that the driver version on your platform may be different to the version you are compiling for (the shader binary format has changed over time); the offline compiler lets you specify the DDK version in addition to the hardware version - can you check that?

    Cheers,
    Pete

Children
No data