Skip to content

opengl: fix and refine memory barriers

Niklas Haas requested to merge gl-barriers into master

The current memory barriers were either used illegally (tex_gl->target??), overspecified (e.g. the forced barrier after glDispatchCompute), or just plain missing (e.g. barriers for storage images that might also be used in other ways).

Fix this mess by making the barrier usage consistent:

  1. Only submit memory barriers on descriptors when unbinding them from shaders that might write to the resource
  2. Skip unnecessary memory barriers for readonly resources
  3. Submit all the barriers required for the object's usage flags

Merge request reports

Loading