Would it be better to avoid that deref path manipulation by doing this lowering in lower_index_loads()?
I remember to have considered this, but: - Intertwining the logic for indexing column-major matrices with the logic for non-constant vector dereferences may get messy. - I just remembered that we probably want to run this pass after folding constant expressions, to avoid adding instructions that we can't fold, e.g. just because of an unfolded cast in the index. This, unless we make the passes smart enough so they can fold `x + 0 = x` and `x * 0 = 0`.
So, I moved the pass after the constant folding. I am afraid that that also requires to go through the lower_casts_to_bool() and lower_int_dot() passes a second time.
If not, I'd rather have a dedicated interface for "get the immediate parent of this deref". I really want to make as little code touch the "path" fields as possible.
I changed `hlsl_new_load_partial_path()` to `hlsl_new_load_path_parent()`. I wonder if it will be possible to keep a low level of path manipulation for the resources support though.