OSDN Git Service

nir: rewrite varying component packing
authorTimothy Arceri <tarceri@itsqueeze.com>
Sun, 9 Dec 2018 23:23:51 +0000 (10:23 +1100)
committerTimothy Arceri <tarceri@itsqueeze.com>
Fri, 8 Feb 2019 02:54:56 +0000 (02:54 +0000)
commit26aa460940f6222565ad5eb40a21c2377c59c3a6
tree4e8afc8798f1d2af3e8e7f81c13a5f22e67f9e4e
parent2f532604173d9c9a35f57120cdb2c2ec8447b6d6
nir: rewrite varying component packing

There are a number of reasons for the rewrite.

1. Adding support for packing tess patch varyings in a sane way.

2. Making use of qsort allowing the code to be much easier to
   follow.

3. Fixes a bug where different interp types caused component
   packing to be skipped for all varyings in some scenarios.

4. Allows us to add a crude live range analysis for deciding
   which components should be packed together. This support can
   optionally be added in a future patch.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/compiler/nir/nir_linking_helpers.c