When using motion blur GPU materials and its resources can be freed when still in use. This fix adds a workaround to store these resources temporarily in a render discard pile. When rendering is finished (or between frames) the resources are moved to the regular discard pile. Pull Request: https://projects.blender.org/blender/blender/pulls/138809