Skip to content

intel/nir: Rework 64-bit instruction lowering

We do some awkward stuff with 64-bit instruction lowering so that we can avoid loop unrolling deciding to unroll a loop containing a 64-bit sqrt() instruction 50 times and blowing up the shader. Unfortunately, this results in basically no optimizations being run on 64-bit values prior to lowering them and so we generate more expensive shaders than needed. This patch instead makes loop unrolling a bit more configurable so that it has some sense that 64-bit sqrt() isn't a cheap instruction and it should try not to create too many of them. This allows us to go ahead and run the full optimization suite before we lower anything and hopefully we'll end up with fewer giant instructions in shaders.

Merge request reports