}
#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.
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];
}
}
+ 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;
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);
}
}