iris: Track per-stage bind history, reduce work accordingly
authorKenneth Graunke <kenneth@whitecape.org>
Tue, 10 Sep 2019 18:14:57 +0000 (11:14 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 18 Sep 2019 22:44:22 +0000 (15:44 -0700)
commitdd83ef0d1a14b144c562129b5572f9ebdbe56042
tree6a1c6df6676d2cd4ebae6570304020a025838bc5
parent1e7daaa6c9a1bcf5f1ae7d85519e61f78cf91518
iris: Track per-stage bind history, reduce work accordingly

We now track per-stage bind history for constant and shader buffers,
shader images, and sampler views by adding an extra res->bind_stages
field to go with res->bind_history.

This lets us flag IRIS_DIRTY_CONSTANTS for only the specific stages
involved, and also skip some CPU overhead in iris_rebind_buffer.

Cuts 4% of 3DSTATE_CONSTANT_XS packets in a Shadow of Mordor trace
on Icelake.

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
src/gallium/drivers/iris/iris_context.h
src/gallium/drivers/iris/iris_resource.c
src/gallium/drivers/iris/iris_resource.h
src/gallium/drivers/iris/iris_state.c