[PATCH vkd3d 2/5] vkd3d-shader/hlsl: Perform a copy propagation pass.

Giovanni Mascellani gmascellani at codeweavers.com
Fri Nov 12 04:26:15 CST 2021


Hi,

On 11/11/21 22:24, Zebediah Figura wrote:
> Actually I think you're right, but I didn't realize because I've seen 
> that idiom used elsewhere. Specifically, compare_register_range() and 
> compare_descriptor_range() in libs/vkd3d/state.c are definitely broken, 
> and we have a few other comparison functions which are only not broken 
> by virtue of implicit bounds.

The idiom is correct if it is assumed that the integers you're trying to 
compare are smaller than INT_MAX/2 (possibly - 1, because I didn't do 
the math throughout). I don't know that code, but this assumption seems 
plausible in that case, while it certainly is not for pointers.

> Unless we're both missing something...

It seems that Matteo agrees with us. Has it ever happened that three 
Wine developers agreed on something and they were wrong? :-P

Giovanni.



More information about the wine-devel mailing list