How can I use GLSL ES shader binaries in my application?

This topic contains 1 reply, has 1 voice, and was last updated by  Joe Davis 5 years ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #31042

    Joe Davis
    Member

    How can I use GLSL ES shader binaries in my application?

    #36338

    Joe Davis
    Member

    The GLSL ES compilers we provide in the SDK are for performance analysis only and do not produce binaries.

    If you want to use binary shaders in your application, there are two options:

    1. Use the OES_get_program_binary OGLES2 extension (http://www.khronos.org/registry/gles/extensions/OES/OES_get_program_binary.txt) to retrieve shaders that have been compiled online by the target device so they can be cached for later use. Doing so means an application can deploy shader source to all target PowerVR platforms, but can benefit from the lower initialisation overhead of using pre-compiled shaders once they’ve been compiled once and retrieved (which could be done on first launch of the application, or during installation etc). There is a Training Course in the SDK called BinaryShader that demonstrates the use of this extension.

    2. Compile shader binaries offline for the target device. The downside of this approach is that the compiled binaries are specific to a graphics core and driver revision, so they are not portable between all PowerVR platforms. The benefits of this approach are that the application does not have the overhead of compiling the shaders once online (as option 1. requires), and that shaders can be deployed to a platform without storing them in human readable text. In applications where the algorithms used in shaders are the main IP of a developer, managing binaries for different hardware and driver configurations is one way of protecting this IP.
    If you need an offline shader compiler for your target platform, you can download an appropriate offline compiler package from our Developer Support portal (you must login to the portal to access these packages)

Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.