iris: Handle binding table in the driver
authorCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Thu, 23 May 2019 05:17:27 +0000 (22:17 -0700)
committerCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Mon, 3 Jun 2019 21:14:45 +0000 (14:14 -0700)
commit1c8ea8b300984ee25bd81db1e4a954b7f08f7091
tree7409f3ad32660ba5a77cdcc1cea29de1e436d749
parent518f83236b90b21e08585ada4555655c8f14b0ba
iris: Handle binding table in the driver

Stop using brw_compiler to lower the final binding table indices for
surface access.  This is done by simply not setting the
'prog_data->binding_table.*_start' fields.  Then make the driver
perform this lowering.

This is a better place to perfom the binding table assignments, since
the driver has more information and will also later consume those
assignments to upload resources.

This also prepares us for two changes: use ibc without having to
implement binding table logic there; and remove unused entries from
the binding table.

Since the `block` field in brw_ubo_range now refers to the final
binding table index, we need to adjust it before using to index
shs->constbuf.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/gallium/drivers/iris/iris_binder.c
src/gallium/drivers/iris/iris_context.h
src/gallium/drivers/iris/iris_disk_cache.c
src/gallium/drivers/iris/iris_program.c
src/gallium/drivers/iris/iris_program_cache.c
src/gallium/drivers/iris/iris_state.c