microsoft / OpenCLOn12

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

Resource migration tasks need more graceful handling of resource allocation failure #16

Open jenatali opened 3 years ago

jenatali commented 3 years ago

If a resource migration task fails, it can throw an exception. There may not be a handler for this exception, if this is happening from the task thread, which results in an abort. There's 2 things we should fix here:

  1. Ensure there's a handler so this doesn't tear down the entire app.
  2. Ensure future accesses to that resource can deal with having a null active resource from allocation failure, to avoid nullptr accesses from just crashing the app later on.