GNOME Bugzilla – Bug 750185
gl: Not showing any video on Android (skip glDrawElements, PowerVR SGX 544MP)
Last modified: 2015-06-10 11:31:52 UTC
Created attachment 304328 [details] log A simple videotestsrc ! glimagesink pipeline on Android does not produce any video anymore on some devices. It works on Android 5.1.1 on my Nexus 7, but not on 4.2.2 on my phone. adb logcat gives a lot of lines like the following: E/IMGSRV (11113): :0: skip glDrawElements (indices=1(0x0), bindBuffer=1) Attached is a debug log with GST_DEBUG=3,gl*:6
FWIW, RGBA/BGRA also don't work, it's not specific to I420.
This smells like a broken glDrawElements with VAO's. Probably a PowerVR driver bug. This works on my android 4.1.2 and my 5.0 devices. Both with Adreno GPU chips in them. One test is to remove the :OES\0 from gst-libs/gst/gl/glprototypes/vao.h Or set the four function pointers in that file to NULL after the extension checking has been performed and see if that helps your situation.
Yes, removing the OES\0 from voa.h makes it work again. So should we blacklist this driver? Only this version? ...? Do you have any ideas why it could decide to skip glDrawElements()?
(In reply to Sebastian Dröge (slomo) from comment #3) > Yes, removing the OES\0 from voa.h makes it work again. So should we > blacklist this driver? Only this version? ...? Not sure. Depends on what other PowerVR chips are affected? Let's start with just that version of the driver and extend it if necessary. > Do you have any ideas why it could decide to skip glDrawElements()? The revision section of https://www.khronos.org/registry/gles/extensions/OES/OES_vertex_array_object.txt mentions adding the ELEMENT_ARRAY_BUFFER_BINDING to the list of encapsulated state a month after the original extension was created so the driver could have been written against an old version of the extension. GL is good like that. I'm surprised we've gotten this far without introducing a blacklist system ;).
Which things would be blacklist then? The combination of > GL_VERSION: OpenGL ES 2.0 build 1.9@2204701 > GL_VENDOR: Imagination Technologies > GL_RENDERER: PowerVR SGX 544MP ? Or something else?
Whatever is specific enough :) VENDOR + RENDERER gets you the platform. VERSION gets you the version of the driver (if it exists after the GL version). PC games typically uses a list of pci ids to choose features or possibly change runtime paths. If something similar exists for android, we can use that as well.
So what do you suggest to do here? I don't think getting PCI IDs is a good idea here, it's very hardware specific and might not be possible everywhere.
The pci id is just another data point that also provides some information on the hardware. In the end it's all heuristics so whatever limits the impact on other drivers/gpu's is fine.
Start with the exact output of the VENDOR/RENDERER/VERSION and we can expand it if necessary.
Alright, how would you suggest to do that? Just set those functions to NULL in an if block after GL initialization? Or do you have a more clever idea? :)
Just set the functions to NULL, if we need something else later, we'll deal with that when we get there :)
Created attachment 304929 [details] [review] gl: OES_vertex_array_object is improperly implemented on PowerVR SGX 544MP
Created attachment 304930 [details] [review] gl: OES_vertex_array_object is improperly implemented on PowerVR SGX 544MP
I didn't include the version in the check here as I think it's probably better to blacklist more things (and potentially work less efficient) than having a user just seeing black video. I also first considered to only check the prefix "PowerVR SGX" of the GL_RENDERER string.
Review of attachment 304930 [details] [review]: Looks good
commit e7ca427ddbe4e89dbfc1f0279798891d75af39df Author: Sebastian Dröge <sebastian@centricular.com> Date: Wed Jun 10 11:42:06 2015 +0200 gl: OES_vertex_array_object is improperly implemented on PowerVR SGX 544MP https://bugzilla.gnome.org/show_bug.cgi?id=750185