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_build_fragment_shader.glsl
30 30
//////////////////////////////////////////////////////////////////////////////////////////////
31 31
// per-pixel linked list. Order Independent Transparency.
32 32

  
33
uniform vec2 u_Size;
33
uniform uvec2 u_Size;
34 34
uniform uint u_numRecords;
35 35

  
36 36
layout (binding=0, offset=0) uniform atomic_uint u_Counter;
......
53 53

  
54 54
  if( ptr<u_numRecords )
55 55
    {
56
    ptr = 3u*ptr + uint(u_Size.x*u_Size.y);
56
    ptr = 3u*ptr + u_Size.x*u_Size.y;
57 57

  
58 58
    u_Records[ptr+1u] = depth;
59 59
    u_Records[ptr+2u] = rgba;
60 60

  
61 61
    memoryBarrier();
62 62

  
63
    uint prev = uint(ij.x + ij.y * u_Size.x);
63
    uint prev = uint(ij.x) + uint(ij.y) * u_Size.x;
64 64
    uint curr = u_Records[prev];
65 65

  
66 66
    while (true)

Also available in: Unified diff