Hello,
I attach a second version of the previous patch, now rebased into the master branch.
I will start working on including the suggestions that Zebediah's made in the other e-mails.
Besides those, I will also check if we can remove the "type" argument from hlsl_new_load(), I think it can be deducted from the path and the variable.
Best regards, Francisco.
On 14-06-22 23:05, Francisco Casas wrote:
Hello,
On 13-06-22 11:59, Francisco Casas wrote:
Okay, I stopped working on multiple register offsets and now I am working on this approach.
I still think that adding a pass to translate these "route"s to the original register "offset"s, so that we can implement this change gradually, is good. We can move the pass forward as we change more passes to work with component offsets. And we can debug more easily the things that we don't translate correctly.
I am aiming to implement the new approach until right after split_matrix_copies, and put the translation afterwards. So far it seems to be going nicely.
I attach a patch that achieves this, in case there are any opinions.
The "paths"[1] of component indexes seem like the best way to solve the problem after all. I think that keeping them as an arrays of nodes in the hlsl_deref allows to write more uniform code than using a more complex data structure, as Giovanni mentioned.
IMO, I think this patch manages matrices nicely too, but there is the problem that it is based on top of
bb49bdba gmascellani vkd3d-shader/hlsl: Allow majority modifiers on function declarations.
which is a little behind of master.
So I still have to rebase it on top of current master, and in particular on top of the recent patches pertaining matrices. So I will probably have to make some design decisions while solving the conflicts.
I guess that the main objective is that we don't want to deal with matrices at all after splitting matrix copies.
Best regards, Francisco.
[1] I hope that this is a better name than "route".