anchor.diff:              yield ComputeCommand.Bind scanTexture
               yield ComputeCommand.SetInput xInput
               yield ComputeCommand.Dispatch(V2i(ceilDiv input.Size.X Kernels.scanSize, input.Size.Y))
  -
               yield ComputeCommand.Sync(output.Texture)
   
  -            let innerCount = 1 + input.Size.X / Kernels.scanSize
  -            yield! buildX args output (Kernels.scanSize  - 1) Kernels.scanSize innerCount
  -            yield! buildY args output 0 1 input.Size.Y
  +            let xRange = { offset = 0; delta = 1; count = input.Size.X }
  +            yield! buildDim args 0 output (next xRange)
  +            if xRange.count > Kernels.scanSize then
  +                yield! repair args 0 output xRange
  +
  +            let yRange = { offset = 0; delta = 1; count = input.Size.Y }
  +            yield! buildDim args 1 output yRange
           ]
   
   
  
positive.code:             if rgid < inputSize then
                  outputImage.[mk2d dim rgid y] <- mem.[rlid]
                  //(%write) outputImage rgid y mem.[rlid]
          }
  
  
  
negative.code:     let mk2d (dim : int) (x : int) (y : int) =
          if dim = 0 then V2i(x,y)
          else V2i(y,x)
          
      [<ReflectedDefinition; Inline>]
      let mk3d (dim : int) (x : int) (yz : V2i) =
          if dim = 0 then V3i(x, yz.X, yz.Y)
          elif dim = 1 then V3i(yz.X, x, yz.Y)
          else V3i(yz.X, yz.Y, x)
  
      [<LocalSize(X = halfScanSize, Y = 1)>]
      let scanImageKernel2dTexture (add : Expr<V4d -> V4d -> V4d>) (dim : int) (outputImage : Image2d<Formats.rgba32f>) =
  