Right now a mem object has a single active device and the contents are always migrated when it's used somewhere else. Instead, we should track multiple active devices, and only invalidate others when a (potentially) writing operation is done. Read-only maps, copies as a source, binds to constant memory, or binds to read-only images should all avoid invalidating other device's contents.
Right now a mem object has a single active device and the contents are always migrated when it's used somewhere else. Instead, we should track multiple active devices, and only invalidate others when a (potentially) writing operation is done. Read-only maps, copies as a source, binds to constant memory, or binds to read-only images should all avoid invalidating other device's contents.