freedreno: add resource tracking support for written buffers