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.