anchor.diff:          let b = device.CreateBuffer<uint32>(64L * int64 blocks)
           let counter = device.CreateBuffer<int>(Array.zeroCreate 1)
   
  -        input.["channel"] <- 0
           input.["data"] <- targetBuffer
           input.["ranges"] <- ranges
           input.["counter"] <- counter
           input.["mask"] <- b
           input.Flush()
           
  -        device.perform {
  -            do! Command.Bind encode
  -            do! Command.SetInputs input
  -            do! Command.Dispatch blocks
  -        }
  +        let offsets : V3i[] = Array.zeroCreate blocks
  +        let counts : V3i[] = Array.zeroCreate blocks
  +
  +        for c in 0 .. 2 do
  +            input.["channel"] <- c
  +            input.Flush()
  +
  +            device.perform {
  +                do! Command.Bind encode
  +                do! Command.SetInputs input
  +                do! Command.Dispatch blocks
  +            }
  +
  +            let r = Array.zeroCreate blocks
  +            ranges.Download(r)
  +            for i in 0 .. blocks - 1 do
  +                offsets.[i].[c] <- r.[i].X
  +                counts.[i].[c] <- r.[i].Y
  +
  +
   
           let cnt = Array.zeroCreate 1
           counter.Download(cnt)
  
positive.code: 
          let image = PixImage<byte>(Col.Format.RGBA, V2i(32,32))
          image.GetMatrix<C4b>().SetByCoord(fun (c : V2l) ->
              rand.UniformC3f().ToC4b()
          ) |> ignore
  
          let alignedSize = V2i(next image.Size.X 8, next image.Size.Y 8)
  
negative.code:         let arr = Array.zeroCreate cnt.[0]
          b.Download(0L, arr, 0L, arr.LongLength)
  
     
  
          printfn "%A (%A) %A" arr.[0] offsets.[0] cnt.[0]
  
  
          
  