Zebediah Figura (@zfigura) commented about libs/vkd3d-shader/hlsl.h:
uint32_t index; };
+/* A field within a struct type declaration, used in hlsl_type.e.fields. */ struct hlsl_struct_field { struct vkd3d_shader_location loc; struct hlsl_type *type; const char *name; struct hlsl_semantic semantic; + + /* Bitfield for storing type modifiers specific to this field, subset of + * HLSL_TYPE_MODIFIERS_MASK, but can also include interpolation modifiers such as + * HLSL_STORAGE_NOINTERPOLATION for pixel shader inputs. */
This is wrong/misleading for two reasons: * HLSL_TYPE_MODIFIERS_MASK isn't actually stored here; it only goes on the type [v. apply_type_modifiers()]; * it's valid to put nointerpolation on other shader types. I also don't know if it's *correct* that we return an error for all other storage modifiers. But conceptually I wouldn't bother mentioning exactly which HLSL_STORAGE_* flags are valid because I don't think it's important in order to understand the code. I.e. any other storage flags are either going to be filtered out by hlsl_error() or they're just going to be ignored. [I do think it makes sense to mark that HLSL_MODIFIER_* is stored on the type but HLSL_STORAGE_* is on the hlsl_field/hlsl_var, lest someone ask "why do we have two different modifiers fields that store the same information?") -- https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/50#note_17514