Skip to content

cso_context: remove ability to restore VBs, const bufs, sampler views, images, perf++

Marek Olšák requested to merge mareko/mesa:cso-remove-resource-tracking into master

@sroland

This is meant to decrease CPU overhead and reduce the use of cso_context when better solutions are possible.

These functions are removed. Gallium frontends should just use pipe_context:

  • cso_set_sampler_views
  • cso_set_shader_images
  • cso_set_constant_buffer*

Additionally, vertex buffers are passed through cso_context but they are not saved there. The only remaining role of cso_context with regard to vertex buffers is to decide whether to go through u_vbuf or skip it. u_vbuf also can't save and restore vertex buffers anymore.

This is how the states will be restored for meta ops:

  • in st/mesa, set st->dirty |= flags to re-bind whatever state has been touched
  • outside of st/mesa, there is new interface st_context_iface::invalidate_state that external modules can use to essentially set st->dirty through it (like HUD)

Merge request reports