iris: Defer stream output target space allocation until set time
authorKenneth Graunke <kenneth@whitecape.org>
Mon, 1 Feb 2021 13:12:30 +0000 (05:12 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 4 Mar 2021 21:59:20 +0000 (13:59 -0800)
commite40fafa991755c22ab82db472acb76d0a9b48c41
tree93d26dd2a5adb47986bcb8aeb1a53c59f3337652
parent5659460af4dd5b5ca78487fff54210057db1f43a
iris: Defer stream output target space allocation until set time

In the future, Marek is planning to make u_threaded_context call
create_stream_output_target() from a different thread than the main
driver thread, which means that we can't safely use uploaders there.

To prepare for this eventual future, just defer the allocation of
the offset BO 'til later.  It's a very small amount of overhead.

Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8964>
src/gallium/drivers/iris/iris_state.c