You're just following the previous style, so that's not on you, but I find more readable to use `(1ull << ...)` to express bit flags.
In the header, sure. I don't think that's necessarily true when looking them up from debug traces though.
Note that while I'll go along with this for reasons of expediency, adding all of these flags at once is still a fair bit coarser than what's ideal; ideally we'd add these one by one as we find shaders needing them. As it is, the d3d-asm and spirv backends can't handle them, and I have no idea which, if any, of these are exercised by the tests.
+ VKD3DSGF_ENABLE_MSAD = 0x80,
Note that VKD3DSGF_ENABLE_MSAD is within VKD3D_SM4_GLOBAL_FLAGS_MASK; does that flag exist in tpf as well?
+enum dxil_shader_properties_tag +{ + SHADER_PROPERTIES_FLAGS = 0, + SHADER_PROPERTIES_GEOMETRY = 1, + SHADER_PROPERTIES_DOMAIN = 2, + SHADER_PROPERTIES_HULL = 3, + SHADER_PROPERTIES_COMPUTE = 4, + SHADER_PROPERTIES_AUTO_BINDING_SPACE = 5, + SHADER_PROPERTIES_RAY_PAYLOAD_SIZE = 6, + SHADER_PROPERTIES_RAY_ATTRIB_SIZE = 7, + SHADER_PROPERTIES_SHADER_KIND = 8, + SHADER_PROPERTIES_MESH = 9, + SHADER_PROPERTIES_AMPLIFICATION = 10, + SHADER_PROPERTIES_WAVE_SIZE = 11, + SHADER_PROPERTIES_ENTRY_ROOT_SIG = 12, +};
Similarly, most of these are unused.
+static void sm6_parser_emit_global_flags(struct sm6_parser *sm6, const struct sm6_metadata_value *m) +{ ... + /* Rotate SKIP_OPTIMIZATION from bit 0 to bit 4 to match TPF. */
We don't particularly care about TPF here; we're translating to vkd3d_shader_global_flags.