Program: 23699
Project: 23699
Buggy source:
private void loadImages(){
  mBufferIDs=new int[13];
  mImages=new Allocation[13];
  mAllocIDs=Allocation.createSized(mRS,Element.USER_FLOAT,mBufferIDs.length);
  Element ie=Element.RGB_565;
  mImages[0]=Allocation.createFromBitmapResourceBoxed(mRS,mRes,R.drawable.p01,ie,true);
  mImages[1]=Allocation.createFromBitmapResourceBoxed(mRS,mRes,R.drawable.p02,ie,true);
  mImages[2]=Allocation.createFromBitmapResourceBoxed(mRS,mRes,R.drawable.p03,ie,true);
  mImages[3]=Allocation.createFromBitmapResourceBoxed(mRS,mRes,R.drawable.p04,ie,true);
  mImages[4]=Allocation.createFromBitmapResourceBoxed(mRS,mRes,R.drawable.p05,ie,true);
  mImages[5]=Allocation.createFromBitmapResourceBoxed(mRS,mRes,R.drawable.p06,ie,true);
  mImages[6]=Allocation.createFromBitmapResourceBoxed(mRS,mRes,R.drawable.p07,ie,true);
  mImages[7]=Allocation.createFromBitmapResourceBoxed(mRS,mRes,R.drawable.p08,ie,true);
  mImages[8]=Allocation.createFromBitmapResourceBoxed(mRS,mRes,R.drawable.p09,ie,true);
  mImages[9]=Allocation.createFromBitmapResourceBoxed(mRS,mRes,R.drawable.p10,ie,true);
  mImages[10]=Allocation.createFromBitmapResourceBoxed(mRS,mRes,R.drawable.p11,ie,true);
  mImages[11]=Allocation.createFromBitmapResourceBoxed(mRS,mRes,R.drawable.p12,ie,true);
  mImages[12]=Allocation.createFromBitmapResourceBoxed(mRS,mRes,R.drawable.p13,ie,true);
  int black[]=new int[1024];
  for (int ct=0; ct < mImages.length; ct++) {
    Allocation.Adapter2D a=mImages[ct].createAdapter2D();
    int size=512;
    int mip=0;
    while (size >= 2) {
      a.subData(0,0,2,size,black);
      a.subData(size - 2,0,2,size,black);
      a.subData(0,0,size,2,black);
      a.subData(0,size - 2,size,2,black);
      size>>=1;
      mip++;
      a.setConstraint(Dimension.LOD,mip);
    }
    mImages[ct].uploadToTexture(1);
    mBufferIDs[ct]=mImages[ct].getID();
  }
  mAllocIDs.data(mBufferIDs);
}

Fixed version (ground truth):
private void loadImages(){
  mBufferIDs=new int[13];
  mImages=new Allocation[13];
  mAllocIDs=Allocation.createSized(mRS,Element.USER_F32(mRS),mBufferIDs.length);
  Element ie=Element.RGB_565(mRS);
  mImages[0]=Allocation.createFromBitmapResourceBoxed(mRS,mRes,R.drawable.p01,ie,true);
  mImages[1]=Allocation.createFromBitmapResourceBoxed(mRS,mRes,R.drawable.p02,ie,true);
  mImages[2]=Allocation.createFromBitmapResourceBoxed(mRS,mRes,R.drawable.p03,ie,true);
  mImages[3]=Allocation.createFromBitmapResourceBoxed(mRS,mRes,R.drawable.p04,ie,true);
  mImages[4]=Allocation.createFromBitmapResourceBoxed(mRS,mRes,R.drawable.p05,ie,true);
  mImages[5]=Allocation.createFromBitmapResourceBoxed(mRS,mRes,R.drawable.p06,ie,true);
  mImages[6]=Allocation.createFromBitmapResourceBoxed(mRS,mRes,R.drawable.p07,ie,true);
  mImages[7]=Allocation.createFromBitmapResourceBoxed(mRS,mRes,R.drawable.p08,ie,true);
  mImages[8]=Allocation.createFromBitmapResourceBoxed(mRS,mRes,R.drawable.p09,ie,true);
  mImages[9]=Allocation.createFromBitmapResourceBoxed(mRS,mRes,R.drawable.p10,ie,true);
  mImages[10]=Allocation.createFromBitmapResourceBoxed(mRS,mRes,R.drawable.p11,ie,true);
  mImages[11]=Allocation.createFromBitmapResourceBoxed(mRS,mRes,R.drawable.p12,ie,true);
  mImages[12]=Allocation.createFromBitmapResourceBoxed(mRS,mRes,R.drawable.p13,ie,true);
  int black[]=new int[1024];
  for (int ct=0; ct < mImages.length; ct++) {
    Allocation.Adapter2D a=mImages[ct].createAdapter2D();
    int size=512;
    int mip=0;
    while (size >= 2) {
      a.subData(0,0,2,size,black);
      a.subData(size - 2,0,2,size,black);
      a.subData(0,0,size,2,black);
      a.subData(0,size - 2,size,2,black);
      size>>=1;
      mip++;
      a.setConstraint(Dimension.LOD,mip);
    }
    mImages[ct].uploadToTexture(1);
    mBufferIDs[ct]=mImages[ct].getID();
  }
  mAllocIDs.data(mBufferIDs);
}