From: Kenneth Graunke Date: Sat, 15 Sep 2018 21:35:47 +0000 (-0700) Subject: iris: move binder pinning outside the dirty == 0 check X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2963276a58fbc6e1086802dc45e1ec5c71217771;p=mesa.git iris: move binder pinning outside the dirty == 0 check This might be a new batch with back to back non-dirty calls, if so we need to inherit the old binder... --- diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c index d1d7123bcc6..9aea7a8f0b3 100644 --- a/src/gallium/drivers/iris/iris_state.c +++ b/src/gallium/drivers/iris/iris_state.c @@ -3489,13 +3489,6 @@ iris_upload_dirty_render_state(struct iris_context *ice, } } - /* Always pin the binder. If we're emitting new binding table pointers, - * we need it. If not, we're probably inheriting old tables via the - * context, and need it anyway. Since true zero-bindings cases are - * practically non-existent, just pin it and avoid last_res tracking. - */ - iris_use_pinned_bo(batch, binder->bo, false); - for (int stage = 0; stage <= MESA_SHADER_FRAGMENT; stage++) { if (dirty & (IRIS_DIRTY_BINDINGS_VS << stage)) { iris_emit_cmd(batch, GENX(3DSTATE_BINDING_TABLE_POINTERS_VS), ptr) { @@ -3790,6 +3783,13 @@ iris_upload_render_state(struct iris_context *ice, struct iris_batch *batch, const struct pipe_draw_info *draw) { + /* Always pin the binder. If we're emitting new binding table pointers, + * we need it. If not, we're probably inheriting old tables via the + * context, and need it anyway. Since true zero-bindings cases are + * practically non-existent, just pin it and avoid last_res tracking. + */ + iris_use_pinned_bo(batch, ice->state.binder.bo, false); + iris_upload_dirty_render_state(ice, batch, draw); if (draw->index_size > 0) {