nir/lower_tex: Fix progress report when called in a loop

Submitted by Boris Brezillon on June 17, 2019, 10:21 a.m.

Details

Reviewer None
Submitted June 17, 2019, 10:21 a.m.
Last Updated June 17, 2019, 10:21 a.m.
Revision 1

Cover Letter(s)

Revision 1
      Hello,

I've recently been working on adding a new lowering option to the
lower_tex() logic and found out that doing

	do progress = nir_lower_tex(); while (progress);

is not working well (nir_lower_tex() keeps returning true and lowering
the same instructions over and over again).

The 2 patches in this series seem to fix my issues, but I'm only using
txp and rect lowering, and looking at the rest of the code I fear there
are other places that could lower things twice of keep reporting that
things have progressed even if it's not true (yuv to rgb conversion is
of these). So, my question is, are nir_lower_tex() users supposed to
clear options flags manually after this pass and limit the number
of passes (through some experimenting) or should we try to fix
nir_lower_tex()?

Regards,

Boris

Boris Brezillon (2):
  nir/lower_tex: Actually report when projector lowering happened
  nir/lower_tex: Update ->sampler_dim value before calling
    get_texture_size()

 src/compiler/nir/nir_lower_tex.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
    

Revisions