Difference between revisions of "Portal:OpenGL Concepts/Memory Model"

From OpenGL Wiki
Jump to navigation Jump to search
(Memory model overview)
 
m (Bot: Updating section links to use redirects.)
 
Line 3: Line 3:
 
Rendering to the same image as one is sampling from is one such case. A second case is when dealing with multiple contexts that have objects shared between them. State set from one context may not be immediately visible in another; special considerations need to be taken.
 
Rendering to the same image as one is sampling from is one such case. A second case is when dealing with multiple contexts that have objects shared between them. State set from one context may not be immediately visible in another; special considerations need to be taken.
  
The big one has to do with [[Image Load Store|arbitrary image reads/writes]] in GL 4.2+. The use of this feature (as well as [[Shader Storage Buffer Object|some related ones]]) completely [[Memory Model#Incoherent memory access|throws out any implicit GL memory model]], thus forcing all synchronization for these operations on the user.
+
The big one has to do with [[Image Load Store|arbitrary image reads/writes]] in GL 4.2+. The use of this feature (as well as [[Shader Storage Buffer Object|some related ones]]) completely [[Incoherent Memory Access|throws out any implicit GL memory model]], thus forcing all synchronization for these operations on the user.

Latest revision as of 16:38, 6 May 2015

The OpenGL Memory Model governs when state set by one OpenGL command becomes visible to other commands. Normally, the memory model is perfectly sequential and synchronous: state set by one command is immediately visible to any subsequent command, but not any prior ones. However, there are certain cases where the model breaks down or otherwise requires explicit synchronization.

Rendering to the same image as one is sampling from is one such case. A second case is when dealing with multiple contexts that have objects shared between them. State set from one context may not be immediately visible in another; special considerations need to be taken.

The big one has to do with arbitrary image reads/writes in GL 4.2+. The use of this feature (as well as some related ones) completely throws out any implicit GL memory model, thus forcing all synchronization for these operations on the user.