[PATCH vkd3d 04/17] vkd3d-shader/hlsl: Propagate constant loads in copy propagation.

Giovanni Mascellani gmascellani at codeweavers.com
Fri Dec 3 02:52:22 CST 2021


Hi,

On 02/12/21 17:17, Zebediah Figura wrote:
> If this pass is going to be hard to write, I'm fine enough with using 
> this patch as a temporary solution. It's not clear to me that the pass 
> *is* hard to write, but it probably won't make it into 1.3 if that's 
> going to be released soon. Of course, it's also not clear to me that we 
> really *need* a temporary solution...

For sure we don't need it, but as much as we probably don't need most of 
the other optimization passes we have, including copy propagation as a 
whole (except for the bit about uniform objects). Whatever code we 
compile to, it will eventually be re-compiled by a few other compilers, 
at least one of which is probably better than ours and, more 
importantly, knows about which hardware it is compiling for.

To me, optimization passes are currently mostly helpful to produce code 
that can reasonably read by a human to verify that compilation is 
correct. To this end, I think 4/17 is useful (as it will be a 
vectorization pass, as soon as it will exist).

Giovanni.



More information about the wine-devel mailing list