Project

General

Profile

« Previous | Next » 

Revision 344ac0e4

Added by Leszek Koltunski almost 6 years ago

OIT: fix for 'out of memory' crash on Mali GPUs.

~The thing still does not fully work there - there are still strange flashes in apps that innvolve OIT, for example in 'Triblur'.

View differences:

src/main/res/raw/oit_clear_fragment_shader.glsl
26 26
//////////////////////////////////////////////////////////////////////////////////////////////
27 27
// per-pixel linked list. Order Independent Transparency.
28 28

  
29
uniform vec2 u_Size;
29
uniform uvec2 u_Size;
30 30

  
31 31
layout (std430,binding=1) buffer linkedlist  // first (u_Size.x*u_Size.y) uints - head pointers,
32 32
  {                                          // one for each pixel in the Output rectangle.
......
41 41

  
42 42
void main()                    		
43 43
  {
44
  uint index= uint(v_Pixel.x + v_Pixel.y * u_Size.x);
44
  uint index= uint(v_Pixel.x) + uint(v_Pixel.y) * u_Size.x;
45 45
  u_Records[index] = 0u;
46 46
  discard;
47 47
  }

Also available in: Unified diff