From: Kenneth Graunke Date: Mon, 3 Dec 2018 00:06:01 +0000 (-0800) Subject: iris: re-pin inherited streamout buffers X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a24734a2d785b86963e95e0c2d3ad093446124ce;p=mesa.git iris: re-pin inherited streamout buffers --- diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c index 389f4b6f4d0..dd0d16cf684 100644 --- a/src/gallium/drivers/iris/iris_state.c +++ b/src/gallium/drivers/iris/iris_state.c @@ -3758,6 +3758,19 @@ iris_restore_render_saved_bos(struct iris_context *ice, iris_use_optional_res(batch, ice->state.last_res.scissor, false); } + if (ice->state.streamout_active && (clean & IRIS_DIRTY_SO_BUFFERS)) { + for (int i = 0; i < 4; i++) { + struct iris_stream_output_target *tgt = + (void *) ice->state.so_target[i]; + if (tgt) { + iris_use_pinned_bo(batch, iris_resource_bo(tgt->base.buffer), + true); + iris_use_pinned_bo(batch, iris_resource_bo(tgt->offset.res), + true); + } + } + } + for (int stage = 0; stage <= MESA_SHADER_FRAGMENT; stage++) { if (!(clean & (IRIS_DIRTY_CONSTANTS_VS << stage))) continue;