19 Jul
2023
19 Jul
'23
3:29 a.m.
Do we need the macros?
Instead of using a fixed header size, it depends upon packing of each struct, so the only truly reliable way to get the data is declare a struct. Without the macro the first case becomes: ` case D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_ROOT_SIGNATURE:` ` {` ` struct` ` {` ` D3D12_PIPELINE_STATE_SUBOBJECT_TYPE type;` ` ID3D12RootSignature *root_signature;` ` } *subobject = (void *)stream_ptr;` ` desc->root_signature = subobject->root_signature;` ` break;` ` }` It can be done that way if you prefer. -- https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/279#note_39370