The motivation for this is twofold.
Firstly, this makes code a little nicer to read, by virtue of removing a
ubiquitous &(...)->node.
Secondly, and more importantly, this allows for the possibility of constructors
returning a different instruction type than intended. The ultimate goal here is
to return a preallocated "error" instruction when allocation fails, instead of
returning NULL and propagating out-of-memory handling to the caller.
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/153
The main advantage is that this way we're getting valid DXBC checksums for DXBC blobs generated by d3dcompiler. See also https://bugs.winehq.org/show_bug.cgi?id=54464.
--
v3: d3dcompiler: Use vkd3d_shader_parse_dxbc() in d3dcompiler_shader_reflection_init().
d3dcompiler: Use vkd3d_shader_parse_dxbc() in d3dcompiler_strip_shader().
d3dcompiler: Use vkd3d_shader_parse_dxbc() in d3dcompiler_get_blob_part().
d3dcompiler: Use vkd3d_shader_serialize_dxbc() in d3dcompiler_strip_shader().
d3dcompiler: Use vkd3d_shader_serialize_dxbc() in d3dcompiler_get_blob_part().
d3dcompiler: Store DXBC sections as vkd3d_shader_dxbc_section_desc structures.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2577