Fragment Compiler Optimisations

This topic contains 1 reply, has 2 voices, and was last updated by  Xmas 8 years, 1 month ago.

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

    Adventus
    Member

    Hello,

    Using my wrapper OGL2 -> OGLES2 wrapper (gl-wes-v2) i have ported the glN64 graphics plugin to be used with Ari64’s MIPS->ARM Dynarec + Mupen64Plus for Nintendo64 emulation on OMAP3 devices. This plugin heavily utilises glTexEnv blending operations to simulate the Combiner modes of the RSP. To emulate these commands my wrapper produces fragment shader code which are then feed to the shader compiler. I’m wondering what kind of compile time optimisations, if any, are already being done by the OMAP3 fragment shader compiler?

    For instance, is it worthwhile to optimize out one and zero propagation in my wrapper before it reaches the shader compiler? Or will the compiler do this for me?

    Will it optimise cases like this:

    lowp vec4 arg0, arg1, arg2;

    arg0 = gl_FragColor;

    arg1 = arg0;

    arg2 = arg0 * arg1;

    to this:

    lowp vec4 arg2;

    arg2 = gl_FragColor * gl_FragColor;

    Getting good fragment shader performance is going to be crucial for this project.

    Cheers,

    Adventus

    #33397

    Xmas
    Member

    Yes, the compiler is able to do these optimisations.

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