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...
This commit is contained in:
Kenneth Graunke 2018-09-15 14:35:47 -07:00
parent 1a61a211f0
commit 2963276a58
1 changed files with 7 additions and 7 deletions

View File

@ -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) {