Re: NIR: is_used_once breaks multi-pass rendering

2022-01-20 Thread Connor Abbott
There are precise rules for when calculations in GL must return the same result, which are laid out in Appendix A ("Invariance"). The relevant rule here: "Rule 4 The same vertex or fragment shader will produce the same result when run multiple times with the same input. The wording ‘the same

NIR: is_used_once breaks multi-pass rendering

2022-01-20 Thread Marek Olšák
Hi, "is_used_once" within an inexact transformation in nir_opt_algebraic can lead to geometry differences with multi-pass rendering, causing incorrect output. Here's an example to proof this: Let's assume there is a pass that writes out some intermediate value from the position calculation as a