Firefox - Incomplete texture upload by glTexImage2D for large textures, causes screen flickering
Firefox bug report https://bugzilla.mozilla.org/show_bug.cgi?id=1587788
When textures are rapidly uploaded by glTexImage2D, they are uploaded partially. Some parts are uploaded and some are missing. That causes screen flickering when missing parts are white. It happens only sometimes during the render cycle, most of the textures are uploaded correctly.
Reproductible on Fedora 30 / Mesa 19.1.7 / Intel (530, 630) or Radeon 570. Reproductible X11 (GLX), XWayland (GLX), Wayland (EGL ES, Desktop GL).
I compared picture uploaded to the texture and final texture by renderdoc, also a simple testcase fails (apitrace):
26454 glActiveTexture(texture = GL_TEXTURE0)
26455 glBindTexture(target = GL_TEXTURE_2D, texture = 38)
26456 glPixelStorei(pname = GL_UNPACK_ALIGNMENT, param = 8)
26457 glPixelStorei(pname = GL_UNPACK_ROW_LENGTH, param = 1726)
26458 glTexImage2D(target = GL_TEXTURE_2D, level = 0, internalformat = GL_RGBA, width = 1726, height = 1892, border = 0, format = GL_RGBA, type = GL_UNSIGNED_BYTE, pixels = blob(13062368))
26459 glPixelStorei(pname = GL_UNPACK_ROW_LENGTH, param = 0)
26460 glPixelStorei(pname = GL_UNPACK_ALIGNMENT, param = 4)
26461 glGetTexImage(target = GL_TEXTURE_2D, level = 0, format = GL_RGBA, type = GL_UNSIGNED_BYTE, pixels = 0x7f8fba700000)
... pixels are different here