title: What happens if you call glBufferData on a mapped buffer?
body: <p>What happens if you call glBufferData on a buffer currently mapped with glMapBufferRange? I suggest it would be illegal, but I cannot find anything in the spec:</p>
  
  <p><a href="https://www.khronos.org/registry/OpenGL-Refpages/es3.0/html/glBufferData.xhtml" rel="nofollow noreferrer">https://www.khronos.org/registry/OpenGL-Refpages/es3.0/html/glBufferData.xhtml</a></p>
  
  <p>It is illegal in glDrawArrays spec.</p>
  
  <p>Ok, additional challenge:</p>
  
  <p>What if we have context resource sharing and the buffer is currently mapped in thread A with context A, then thread B on context B calls glBufferData on it? </p>