Closed farnoy closed 1 month ago
This is controlled by the metadata definitions for such types. The code generator takes into account whether the original definitions were C-style enums or C++ enum classes and generates the bindings accordingly.
This type is currently marked as
[Flags]
public enum D3D12_BARRIER_SYNC
...
Is there something missing from metadata?
Ah this is a C enum, per DirectX headers
typedef enum D3D12_BARRIER_SYNC
{
D3D12_BARRIER_SYNC_NONE = 0x0,
D3D12_BARRIER_SYNC_ALL = 0x1,
D3D12_BARRIER_SYNC_DRAW = 0x2,
D3D12_BARRIER_SYNC_INDEX_INPUT = 0x4,
...
Not sure there's anything we can do on the metadata side either, everything looks accurate. If you have a more specific enhancement you'd like to see, please create a new issue with more detail.
Suggestion
Compare the generated enum like
D3D12_BARRIER_SYNC
with a similar enum generated byash
. Associated constants (and a richer bitflags API) make it easier to work with and less verbose.You could then write code like this: