Since #118841 there are more cases where Cycles would check for the graphics interop support. This could lead to a crash when graphics interop functions are called without having active graphics context. This change makes it so there is no graphics interop calls when doing headless render. In order to achieve this the device creation is now aware of the headless mode. Pull Request: https://projects.blender.org/blender/blender/pulls/122844