Project

General

Profile

« Previous | Next » 

Revision 6672d895

Added by Leszek Koltunski almost 6 years ago

I am pretty sure this time the flashing issues on Mali T880 r12 driver are finally fixed.

The fix: a queue of FBOs render to, just like before, but this time in DistortedScreen we blit not the current FBO, but the one computed several frames ago.

This of course introduces a delay and uses more memory, but it appears to work and does not seem to have any effects on speed.

View differences:

src/main/java/org/distorted/library/main/Distorted.java
82 82
   * Work around bugs in ARM Mali driver by, instead to a single FBO, rendering to a circular queue
83 83
   * of FBO_QUEUE_SIZE FBOs. (otherwise we sometimes get a 'full pipeline flush' and the end result
84 84
   * might be missing part of the Objects)
85
   *
86
   * This bug only exists on Mali driver r12. TODO: on other platforms, make this equal to 1.
87
   *
88
   * https://community.arm.com/graphics/f/discussions/10285/opengl-es-3-1-on-mali-t880-flashes
85 89
   */
86
  public static final int FBO_QUEUE_SIZE = 4;
90
  public static final int FBO_QUEUE_SIZE = 3;
87 91

  
88 92
  private static boolean mInitialized=false;
89 93

  
......
125 129
    final ActivityManager activityManager     = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
126 130
    final ConfigurationInfo configurationInfo = activityManager.getDeviceConfigurationInfo();
127 131
    android.util.Log.e("DISTORTED", "Using OpenGL ES "+configurationInfo.getGlEsVersion());
128

  
132
    /*
133
    android.util.Log.e("DISTORTED", "GLSL Version "+GLES31.glGetString(GLES31.GL_SHADING_LANGUAGE_VERSION));
134
    android.util.Log.e("DISTORTED", "GL Version "  +GLES31.glGetString(GLES31.GL_VERSION));
135
    android.util.Log.e("DISTORTED", "GL Vendor "   +GLES31.glGetString(GLES31.GL_VENDOR));
136
    android.util.Log.e("DISTORTED", "GL Renderer " +GLES31.glGetString(GLES31.GL_RENDERER));
137
    */
129 138
    GLSL = ( (configurationInfo.reqGlEsVersion>>16)>=3 ? 310 : 100 );
130 139
    GLSL_VERSION= (GLSL==100 ? "#version 100\n" : "#version 310 es\n");
131 140

  

Also available in: Unified diff