microsoft / OpenCLOn12

The OpenCL-on-D3D12 mapping layer
MIT License
104 stars 13 forks source link

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

Open jenatali opened 1 year ago

jenatali commented 1 year 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.