diff options
author | Kenneth Graunke <[email protected]> | 2018-09-15 14:50:26 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2019-02-21 10:26:08 -0800 |
commit | c0422d623ce07daea34b61a6a76be0abd9572f92 (patch) | |
tree | 841c30291e4d42d73bdd8763770ae52213c7f718 /src | |
parent | 2963276a58fbc6e1086802dc45e1ec5c71217771 (diff) |
iris: re-pin binding table contents if we didn't re-emit them
fixes glsl-vs-loop and other regressions from multibinder.
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/iris/iris_state.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c index 9aea7a8f0b3..b6741a7ad84 100644 --- a/src/gallium/drivers/iris/iris_state.c +++ b/src/gallium/drivers/iris/iris_state.c @@ -3097,7 +3097,8 @@ use_ssbo(struct iris_batch *batch, struct iris_context *ice, } #define push_bt_entry(addr) \ - assert(addr >= binder_addr); bt_map[s++] = (addr) - binder_addr; + assert(addr >= binder_addr); \ + if (!pin_only) bt_map[s++] = (addr) - binder_addr; /** * Populate the binding table for a given shader stage. @@ -3109,7 +3110,8 @@ use_ssbo(struct iris_batch *batch, struct iris_context *ice, static void iris_populate_binding_table(struct iris_context *ice, struct iris_batch *batch, - gl_shader_stage stage) + gl_shader_stage stage, + bool pin_only) { const struct iris_binder *binder = &ice->state.binder; struct iris_compiled_shader *shader = ice->shaders.prog[stage]; @@ -3263,6 +3265,13 @@ iris_restore_context_saved_bos(struct iris_context *ice, } for (int stage = 0; stage <= MESA_SHADER_FRAGMENT; stage++) { + if (clean & (IRIS_DIRTY_BINDINGS_VS << stage)) { + /* Re-pin any buffers referred to by the binding table. */ + iris_populate_binding_table(ice, batch, stage, true); + } + } + + for (int stage = 0; stage <= MESA_SHADER_FRAGMENT; stage++) { struct iris_shader_state *shs = &ice->state.shaders[stage]; struct pipe_resource *res = shs->sampler_table.res; if (res) @@ -3500,7 +3509,7 @@ iris_upload_dirty_render_state(struct iris_context *ice, for (int stage = 0; stage <= MESA_SHADER_FRAGMENT; stage++) { if (dirty & (IRIS_DIRTY_BINDINGS_VS << stage)) { - iris_populate_binding_table(ice, batch, stage); + iris_populate_binding_table(ice, batch, stage, false); } } |