I thought about that too. In the end, I don't think I can really do anything to make them more portable while also keeping compatibility with DX SDK. We are a compilers' mercy here; at least (recent) GCC targeting Windows will use MSVC-compatible bitfield layout. Anyway, there's already some bitfield use in WinSDK headers in Wine - same concern applies there.
2016-01-15 12:44 GMT+03:00 Henri Verbeet hverbeet@gmail.com:
On 15 January 2016 at 09:30, Andrey Turkin andrey.turkin@gmail.com wrote:
2016-01-15 3:35 GMT+03:00 Józef Kucia joseph.kucia@gmail.com:
It would preferably be written as "UINT Usage : 1;". This applies to other bit fields.
Make sense, will do
The main thing I'd personally be worried about would be the portability of bit fields. I think that in case of D3D11_VIDEO_PROCESSOR_COLOR_SPACE the layout ends up being the same between MSVC and gcc on x86, but I'm not sure that's something we can depend on, or if that also holds on different compilers or e.g. 64-bit.