From a24734a2d785b86963e95e0c2d3ad093446124ce Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Sun, 2 Dec 2018 16:06:01 -0800 Subject: [PATCH] iris: re-pin inherited streamout buffers --- src/gallium/drivers/iris/iris_state.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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; -- 2.30.2