i965: Select ranges of UBO data to be uploaded as push constants.
authorKenneth Graunke <kenneth@whitecape.org>
Sat, 2 Jan 2016 11:21:28 +0000 (03:21 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Fri, 14 Jul 2017 02:56:49 +0000 (19:56 -0700)
commit6d28c6e52cfd76855c1368560dd90f12493e2580
treed94e2e3a9961a6d02a582851485cca73dc2a2f95
parent2a5e4f15efb7be113cbc310bb7d809578153953d
i965: Select ranges of UBO data to be uploaded as push constants.

This adds a NIR pass that decides which portions of UBOS we should
upload as push constants, rather than pull constants.

v2: Switch to uint16_t for the UBO block number, because we may
    have a lot of them in Vulkan (suggested by Jason).  Add more
    comments about bitfield trickery (requested by Matt).

v3: Skip vec4 stages for now...I haven't finished wiring up support
    in the vec4 backend, and so pushing the data but not using it
    will just be wasteful.

Reviewed-by: Matt Turner <mattst88@gmail.com>
src/intel/Makefile.sources
src/intel/compiler/brw_compiler.h
src/intel/compiler/brw_nir.h
src/intel/compiler/brw_nir_analyze_ubo_ranges.c [new file with mode: 0644]
src/mesa/drivers/dri/i965/brw_gs.c
src/mesa/drivers/dri/i965/brw_tcs.c
src/mesa/drivers/dri/i965/brw_tes.c
src/mesa/drivers/dri/i965/brw_vs.c
src/mesa/drivers/dri/i965/brw_wm.c