+static void
+iris_update_pull_constant_descriptors(struct iris_context *ice,
+ gl_shader_stage stage)
+{
+ struct iris_compiled_shader *shader = ice->shaders.prog[stage];
+
+ if (!shader || !shader->prog_data->has_ubo_pull)
+ return;
+
+ struct iris_shader_state *shs = &ice->state.shaders[stage];
+ bool any_new_descriptors =
+ shader->num_system_values > 0 && shs->sysvals_need_upload;
+
+ unsigned bound_cbufs = shs->bound_cbufs;
+
+ while (bound_cbufs) {
+ const int i = u_bit_scan(&bound_cbufs);
+ struct pipe_shader_buffer *cbuf = &shs->constbuf[i];
+ struct iris_state_ref *surf_state = &shs->constbuf_surf_state[i];
+ if (!surf_state->res && cbuf->buffer) {
+ iris_upload_ubo_ssbo_surf_state(ice, cbuf, surf_state, false);
+ any_new_descriptors = true;
+ }
+ }
+
+ if (any_new_descriptors)
+ ice->state.dirty |= IRIS_DIRTY_BINDINGS_VS << stage;
+}
+