Module: Mesa
Branch: master
Commit: 34cc6a804ec92b5e74cde5b346828874737276a8
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=34cc6a804ec92b5e74cde5b346828874737276a8

Author: Eric Anholt <[email protected]>
Date:   Wed Nov  5 12:41:08 2014 -0800

gallium: Add a nir-to-TGSI pass.

The goal is to replace glsl_to_tgsi.cpp and its supporting code (~10k
LOC).  This code ends up being smaller because NIR has many lowering
passes that help it map better to TGSI than GLSL IR does.

As a benefit, this brings NIR optimizations to TGSI-only drivers.
Many of the softpipe shaders I've looked at end up being significantly
shorter.  Some potentially relevant changes to TGSI consumers:

- All immediates are now UINT typed.  This means they're less legible
  in printouts, but means that they get deduplicated better (no more
  multiple copies of 0x0!)
- Sampler views are not currently declared.
- nir_registers don't have their live ranges tracked, so TGSI temp usage
  may go up with a lot of control flow.
- nir_lower_vec_to_mov naively inserts movs instead of trying to coalesce
  the movs with the generators of the ssa values, sometimes increasing
  instruction count.

Acked-by: Marek Olšák <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3395>

---

 src/gallium/auxiliary/Makefile.sources  |    1 +
 src/gallium/auxiliary/meson.build       |    2 +
 src/gallium/auxiliary/nir/nir_to_tgsi.c | 2647 +++++++++++++++++++++++++++++++
 src/gallium/auxiliary/nir/nir_to_tgsi.h |   33 +
 4 files changed, 2683 insertions(+)

Diff:   
http://cgit.freedesktop.org/mesa/mesa/diff/?id=34cc6a804ec92b5e74cde5b346828874737276a8
_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to