title: Android Renderscript displays corrupted buffer
body: <p>I am developing a simple Renderscript application that does basic image manipulation. It runs fine on my Nexus 5, but not on my Shield Tablet. I have an Allocation (RGB8888) of the same size as a SurfaceView, usage is Allocation.USAGE_SCRIPT. I have another Allocation of the exact same specifications, except the usage is Allocation.USAGE_SCRIPT | Allocation.USAGE_IO_OUTPUT. My Renderscript has been pared down to the bare minimum (package name removed for obvious reasons):</p>
  
  <pre><code>#pragma version(1)
  #pragma rs java_package_name()
  #pragma rs_fp_relaxed
  
  #include "rs_allocation.rsh"
  #include "rs_core.rsh"
  
  void root(const uchar4 *inVal, uchar4 *outVal){
      outVal -&gt; rgba = inVal -&gt; rgba;
  }
  </code></pre>
  
  <p>As you can see, all it does is copy the data from one Allocation to the other. I then call iosend() on the output Allocation, which is bound to a Surface. This displays the image on my Nexus 5, but results in screen corruption (<a href="http://i.stack.imgur.com/5AJye.jpg" rel="nofollow">Image</a>) on the Shield. The nature of the corruption leads me to believe that somehow I'm getting into memory I shouldn't be in.</p>
  
  <p>What makes it really troubling is that copying the input Allocation to a Bitmap, copying the Bitmap to the output Allocation, then calling iosend() on the output Allocation works just fine on both platforms, but completely ruins any RS speed advantage I get on the Tegra K1's GPU.</p>