Created attachment 119567 [details] dmesg Recording a desktop window with obs-studio produces only a red image. This has worked before so i did a bisect and it led to f04f13622f3e71bee057d60a6be9c53b92b56cc9 as the first broken commit. obs-studio displays lots of: error: glCopyImageSubData failed, glGetError returned 0x502 error: device_copy_texture (GL) failed I'm running kernel 4.3, xserver 1.18 and mesa and llvm git. This is on a cape verde card (7750)
Created attachment 119568 [details] output from obs-studio
I just pushed a patch to fix bug 92860, also related to copy image. Please try with http://cgit.freedesktop.org/mesa/mesa/commit/?id=912babba7bf1abd3caa49f6372d581ae1afe7e84 and see if the issue still happens.
Actually you're getting GL_INVALID_OPERATION, whereas the other issue would cause GL_INVALID_VALUE. Please record an (ideally small) apitrace of the issue and make it available for analysis.
Created attachment 119569 [details] apitrace showing the issue Here is an apitrace when trying to record xfce-panel.
OK, so the issue is coming from 70518 glCopyImageSubData(srcName = 9, srcTarget = GL_TEXTURE_2D, srcLevel = 0, srcX = 0, srcY = 0, srcZ = 0, dstName = 8, dstTarget = GL_TEXTURE_2D, dstLevel = 0, dstX = 0, dstY = 0, dstZ = 0, srcWidth = 1920, srcHeight = 31, srcDepth = 1) We error out complaining that the internal formats don't match. Texture 9: 70257 glBindTexture(target = GL_TEXTURE_2D, texture = 9) 70258 glXBindTexImageEXT(display = 0x210df00, drawable = 69206018, buffer = GLX_FRONT_LEFT_EXT, attrib_list = {}) 70259 glTexImage2D(target = GL_TEXTURE_2D, level = 0, internalformat = GL_RGB, width = 1920, height = 31, border = 0, format = GL_RGBA, type = GL_UNSIGNED_BYTE, pixels = blob(238080)) Texture 8: 70244 glBindTexture(target = GL_TEXTURE_2D, texture = 8) 70246 glTexImage2D(target = GL_TEXTURE_2D, level = 0, internalformat = GL_RGBA, width = 1920, height = 31, border = 0, format = GL_RGBA, type = GL_UNSIGNED_BYTE, pixels = blob(238080)) AFAIK this is illegal [copying between GL_RGB and GL_RGBA internal formats], but I haven't double-checked the ARB_copy_image spec or a full GL spec release (where these things are often updated).
(In reply to Ilia Mirkin from comment #5) > AFAIK this is illegal [copying between GL_RGB and GL_RGBA internal formats], > but I haven't double-checked the ARB_copy_image spec or a full GL spec > release (where these things are often updated). Looks like the GL spec was slightly updated a bit on top of what GL_ARB_copy_image says. This is the text from GL 4.5, Section 18.3.3 (Copying Between Images): For the purposes of CopyImageSubData, two internal formats are considered compatible if any of the following conditions are met: • the formats are the same. If the formats are the same but are a base internal format, the the implementation’s effective internal format (see the end of section 8.5) for each image must be the same. • the formats are considered compatible according to the compatibility rules used for texture views as defined in section 8.18. In particular, if both internal formats are listed in the same entry of table 8.30, they are considered compatible • one format is compressed and the other is uncompressed and table 18.5 lists the two formats in the same row. The compressed bullet doesn't apply, and texture views are only defined for sized formats. Looks like on top of what the ARB_copy_image spec says, we're free to deny copying based on arbitrary rules if a base internal format is used (like GL_RGBA/GL_RGB). But only if the two are the same... if they're not (as is the case in the trace you gave), that's always illegal. So... I'm gonna go with obs-studio bug.
Ok, thanks. I opened a bug at the obs-studio bugtracker: https://obsproject.com/mantis/view.php?id=370 btw, issue remains with the patch in comment 2.
Closing this for now. Feel free to reopen should analysis on the obs-studio side disagree with my findings.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.