anchor.diff:  
   
       let testSg (r : IRuntime) =
  -        let pool = ManagedPool r
  +
  +        let signature =
  +            {
  +                mode                = IndexedGeometryMode.TriangleList
  +                vertexBufferTypes   = Map.ofList [ DefaultSemantic.Positions, typeof<V3f>; DefaultSemantic.Normals, typeof<V3f> ]
  +                uniformTypes        = Map.ofList [ Symbol.Create "Hugo", typeof<M44f> ]
  +                indexType           = typeof<int>
  +            }
  +
  +        let pool = ManagedPool(r, signature)
   
           let geometry (pos : V3d) =
               let g = Primitives.unitSphere 0 |> AdaptiveGeometry.ofIndexedGeometry
  -            g.uniforms.[Sym.ofString "Hugo"] <- Mod.constant ((M44d.Translation pos * M44d.Scale 0.1) |> M44f.op_Explicit)
  -            g
  +            { g with uniforms = Map.add (Sym.ofString "Hugo") (Mod.constant ((M44d.Translation pos * M44d.Scale 0.1) |> M44f.op_Explicit) :> IMod) g.uniforms }
   
           let s = 30.0
           let drawCalls =
  
positive.code:             let p = t.GetProperty("Instance", BindingFlags.NonPublic ||| BindingFlags.Public ||| BindingFlags.Static)
              p.GetValue(null) |> unbox<IMod -> IMod<Array>>
          ))
  
      type ManagedBuffer(runtime : IRuntime) =
          inherit DirtyTrackingAdaptiveObject<MappedBufferWriter>()
  
negative.code:         interface IMod<IBuffer> with
              member x.GetValue c = x.GetValue c
  
      type LayoutManager<'a>() =
          let manager = MemoryManager.createNop()
          let store = Dict<'a, managedptr>()
          let cnts = Dict<managedptr, 'a * ref<int>>()
  
  
          member x.Alloc(key : 'a, size : int) =
              match store.TryGetValue key with
                  | (true, v) -> 
                      let _,r = cnts.[v]
                      Interlocked.Increment &r.contents |> ignore
                      v
                  | _ ->
                      let v = manager.Alloc size
                      let r = ref 1
                      cnts.[v] <- (key,r)
                      store.[key] <- (v)
                      v
  
          member x.Free(value : managedptr) =
              match cnts.TryGetValue value with
                  | (true, (k,r)) ->
                      if Interlocked.Decrement &r.contents = 0 then
                          cnts.Remove value |> ignore
                          store.Remove k |> ignore
                  | _ ->
                      ()
  
  
      type ManagedPool(runtime : IRuntime, signature : GeometrySignature) =
          let mutable count = 0
          let indexManager = LayoutManager<BufferView>()
          let vertexManager = LayoutManager<Attributes>()
          let instanceManager = LayoutManager<Uniforms>()
  
          let indexBuffer = new ManagedBuffer(runtime)
          let vertexBuffers = SymbolDict<ManagedBuffer>()
          let instanceBuffers = SymbolDict<ManagedBuffer>()
          let isEmpty = Mod.init true
  
  
          let getVertexBuffer (sym : Symbol) =
              vertexBuffers.GetOrCreate(sym, fun sym -> new ManagedBuffer(runtime))
  
          let getInstanceBuffer (sym : Symbol) =
              instanceBuffers.GetOrCreate(sym, fun sym -> new ManagedBuffer(runtime))
  
  
          member x.IsEmpty = isEmpty :> IMod<_>
  
  