Project

General

Profile

« Previous | Next » 

Revision 073e5a7a

Added by Leszek Koltunski about 3 years ago

Another attempt at fixing tthings on early Qualcomm OpenGL ES 3.0 drivers.

The previous version does not work on Adreno 405 driver V@100, present for example in a Asus ZenPad 8.
Revert the packed 'ivec2' UBO in the vertex shader back to a 'std140' ivec4. This comes at a price if bumping into the bug on Qualcomm driver version 331 on Adreno 308 - i.e. Samsung Galaxy J4+ again.

On this platform, switch off Gigaminx and then set MAX_COMPONENTS to 98.

View differences:

src/main/java/org/distorted/library/mesh/MeshBase.java
51 51
   {
52 52
   private static final int ASSOC_UBO_BINDING  = 3;
53 53
   private static final int CENTER_UBO_BINDING = 4;
54
   public  static final int MAX_EFFECT_COMPONENTS= 242;
54

  
55
   public static int MAX_EFFECT_COMPONENTS= 100;
55 56

  
56 57
   // sizes of attributes of an individual vertex.
57 58
   private static final int POS_DATA_SIZE= 3; // vertex coordinates: x,y,z
......
573 574
     return MAX_EFFECT_COMPONENTS;
574 575
     }
575 576

  
577
///////////////////////////////////////////////////////////////////////////////////////////////////
578
/**
579
 * How many mesh components are we going to need? Call before compilation of the shaders.
580
 */
581
   public static void setMaxEffComponents(int max)
582
     {
583
     MAX_EFFECT_COMPONENTS = max;
584
     }
585

  
576 586
///////////////////////////////////////////////////////////////////////////////////////////////////
577 587

  
578 588
   public static void getUniforms(int programH, int variant)

Also available in: Unified diff