Skip to content

Draft: vkd3d-shader/hlsl: Make deref->data_type available for the whole deref's lifetime.

Francisco Casas requested to merge fcasas/vkd3d:deref_data_type into master

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().

Merge request reports

Loading