Conditional rendering implementation conflicts with aux-state tracking
In iris, the conditional rendering implementation conflicts with the tracking of aux-buffer states. Drawing commands are conditional, but aux-state tracking is unconditional. The driver depends on accurate knowledge of aux-buffer state, so a variety of issues can result when a drawing command is no-op'ed.
For example, the following sequence leads to undefined rendering:
- Allocate color buffer from BO cache.
- Predicated fast-clear to 0 is no-op'ed.
- Non-predicated fast-clear to 0 triggers optimization to skip the fast-clear.
The color buffer contains the original values from the BO cache instead of the 0's from the fast-clear.
Notes for possible solutions:
- i965 is able to maintain accurate aux-state tracking by synchronously evaluating the predicate.
- iris stalls on the CPU for one instance of the general problem (5658c661).