Provide a way to access the implementation of Blaze3D types (CommandEncoder, Device, etc)
NeoForge has introduced a Blaze3D validation layer which wraps the original implementation of Blaze3D interfaces.
Because of this, it is no longer possible for mods to access the backing implementation type via unsafe casts. The only alternative currently is to use Mixins to create accessors on internal details of NeoForge itself, which are undesirable for obvious reasons.
Some mods (such as Sodium) rely on being able to access these implementation details, since they do not use vanilla's code for rendering, and instead import "foreign textures" from the game into their own render code.
It would be useful if NeoForge provided some way to access the type it is delegating calls to, or otherwise provide mods with a way to opt-out of this behavior via other means, so that developers don't have to modify their config files when cloning a new project.
Per RogueLogix on Discord:
The constructors in Validation* are considered public API, though it looks like I made an error with command encoder and renderpass being package-private instead of public (or protected) like the other two are.
We could probably extend the validation types ourselves to get access to the OpenGL object IDs we need, but this would require the constructor on some types to be opened.
Hm, I mean if you're side-stepping the backend independence of blaze3d APIs, the safety is off anyway. At that point it doesn't seem that outlandish to accessor into it. Alternatives are providing unwrappers for backend-specific mods that actually declare they only work with one specific backend. But the end-result is somewhat the same.