lima/ppir: add NIR pass to split varying loads
authorVasily Khoruzhick <anarsoul@gmail.com>
Mon, 23 Sep 2019 05:03:22 +0000 (22:03 -0700)
committerVasily Khoruzhick <anarsoul@gmail.com>
Fri, 27 Sep 2019 01:51:10 +0000 (18:51 -0700)
commit6dd0ad66dedc4cbd79574053f0b5023172935657
tree885d7ae18e40cec969d5bf6bd91cd6e0baa5ebcd
parentc372dc762dac1c0bdf27b5cba112b61c15b8f862
lima/ppir: add NIR pass to split varying loads

NIR may emit a single instrinsic to load several packed varyings,
but that's suboptimal for Utgard PP for several reasons:
- varyings that are used as sampler inputs can be passed using
  pipeline register with increased precision
- we have small number of regs, so using a vec4 regs for storing
  two vec2 varyings increases reg pressure.

Add NIR pass to split a single load into several loads and utilize
it in lima.

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
src/gallium/drivers/lima/Android.mk
src/gallium/drivers/lima/ir/lima_ir.h
src/gallium/drivers/lima/ir/lima_nir_split_load_input.c [new file with mode: 0644]
src/gallium/drivers/lima/lima_program.c
src/gallium/drivers/lima/meson.build