I marked this a draft because it may be a somewhat orthogonal step, but IRRC @giomasce suggested it. While a deref's data type can be computed from the variable's data type as long as the deref is still represented as a path (as we did with hlsl_deref_get_type()), we need the deref.data_type field for when the deref is represented as an offset. While we could get rid of this deref.data_type in the future, if we manage to transform the HLSL IR instructions directly to VSIR withot requiring lowering the derefs to their offset representation, this would take a while. So, this patch makes the deref.data_type field available during the whole lifetime of the deref. Which makes deref.data_type easier to understand (since it can be used anytime now) and we no longer have to call hlsl_deref_get_type(). -- https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/343