microsoft / OpenCLOn12

The OpenCL-on-D3D12 mapping layer
MIT License
108 stars 15 forks source link

Allow using a single mem object read-only across multiple devices in parallel #42

Open jenatali opened 2 years ago

jenatali commented 2 years ago

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.