d3d: Cache offscreen surfaces.