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

Shader bug r12p1

I've recently discovered shader sampling bug on r12p1 on S7 series. Looks visually similar to what we previously had on r7p0.

Reproducing issue

Scenario 1.

Dolphin emulator:

http://dl.dolphin-emu.org/builds/dolphin-master-5.0-600.apk

Homebrew demo:

Neo Tanks - WiiBrew

Unzip downloaded archive, in Dolphin set path to unpacked folder and choose boot.dol, swipe right to a folder icon, run boot.dol.

Screenshots:

r12p1: https://s13.postimg.io/7ca1duydz/download_20160914_002047.png

v145: https://s17.postimg.io/77mtbf2gv/download_20160914_002058.png

 

Scenario 2:

Seascape Benchmark - Android Apps on Google Play (totally black screen)

Screenshots:

r12p1: https://s15.postimg.io/k1glc3ycb/Screenshot_20160913_234123.png

v145: https://s21.postimg.io/i1ire4gvb/download_20160914_004921.png

 

Scenario 3:

REV Vehicle Demo - Android Apps on Google Play

(Missing shaders)

Screenshots:

r12p1: https://s11.postimg.io/jbivi1n9f/download_20160914_002118.png

https://s17.postimg.io/chb8p9rin/download_20160914_002120.png

v145: https://s17.postimg.io/xawj9qvzz/download_20160914_002111.png

https://s10.postimg.io/fejl93v49/download_20160914_002114.png

Parents
  • Based on our investigation looking at the Seascape demo, this looks like an application bug which is being tripped up because more recent drivers are stricter at catching and reporting error conditions due to a significant tightening in test coverage in the OpenGL ES 3.2 conformance tests.

    Khronos recently confirmed that non-constant global initializers are prohibited in the core ESSL spec, so for example in the Seascape shader the following statement is not allowed in global scope:

    uniform float time;
    const float SEA_SPEED = 0.4;
    
    float SEA_TIME = time * SEA_SPEED;   # This requires a uniform, so is not a constant initializer
    

    Stricter conformance tests for OpenGL ES 3.2 means that we expect recent drivers from multiple vendors to start throwing a compile time error on this one, so you will be getting an error reported by glCompileShader for this one which looks like:

    E/        ( 1648): MALI ERROR: Could not compile shader 62:
    E/        ( 1648): 0:40: S0012: Global variable initializer must be a constant expression
    

    There is a new extension published which allow a shader to explicitly re-enable constant initializers which will be shipping in one of our next driver releases, but it's not present in r12p1.

    Kind regards,
    Pete

Reply
  • Based on our investigation looking at the Seascape demo, this looks like an application bug which is being tripped up because more recent drivers are stricter at catching and reporting error conditions due to a significant tightening in test coverage in the OpenGL ES 3.2 conformance tests.

    Khronos recently confirmed that non-constant global initializers are prohibited in the core ESSL spec, so for example in the Seascape shader the following statement is not allowed in global scope:

    uniform float time;
    const float SEA_SPEED = 0.4;
    
    float SEA_TIME = time * SEA_SPEED;   # This requires a uniform, so is not a constant initializer
    

    Stricter conformance tests for OpenGL ES 3.2 means that we expect recent drivers from multiple vendors to start throwing a compile time error on this one, so you will be getting an error reported by glCompileShader for this one which looks like:

    E/        ( 1648): MALI ERROR: Could not compile shader 62:
    E/        ( 1648): 0:40: S0012: Global variable initializer must be a constant expression
    

    There is a new extension published which allow a shader to explicitly re-enable constant initializers which will be shipping in one of our next driver releases, but it's not present in r12p1.

    Kind regards,
    Pete

Children
No data