Closed Bug 1547833 Opened 5 years ago Closed 5 years ago

Work around broken GetDebugMessageLog on android emulator

Categories

(Core :: Graphics: WebRender, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: kats, Assigned: kats)

References

Details

Attachments

(1 file)

Running wrench reftests on i686-linux-android in the android emulator with GLES 3 enabled. After some fiddling I got these going but it seems like the emulator's implementation of GetDebugMessageLog is busted. We load it fine when resolving the APIs using a glutin context here

04-29 17:01:04.574  9091  9107 D RustAndroidGlueStdouterr: loading "glGetDebugMessageLog" gles func, got 0xa741020f
04-29 17:01:04.574  9091  9107 D RustAndroidGlueStdouterr: loading "glGetDebugMessageLogKHR" gles func, got 0xa7410571

but then we try and invoke it via echo_driver_messages it doesn't work:

04-29 17:01:06.127  9091  9107 D RustAndroidGlueStdouterr: About to call GetDebugMessageLog
04-29 17:01:06.127  9091  9108 E libEGL  : called unimplemented OpenGL ES API
04-29 17:01:06.127  9091  9107 D RustAndroidGlueStdouterr: Got 1436172711 messages
04-29 17:01:06.127  9091  9107 D RustAndroidGlueStdouterr: thread 'main' panicked at 'capacity overflow', src/liballoc/raw_vec.rs:746:5

The RustAndroidGlueStdouterr lines are dumps I added locally, showing that it returns a garbage value which then causes a panic at this extend site.

The unimplemented OpenGL ES API output comes from here. Maybe a newer android emulator won't have this problem, but for now I'm just commenting out calls to echo_driver_messages to work around this.

Also important to note is that I don't see this problem when running Gecko reftests on the android emulator. So maybe the glutin-provided GL context that we're getting with wrench is to blame, rather than the emulator's GL implementation. The gecko reftests use the GeckoView test app and so get a GL context differently.

Actually this happens with the gecko reftests too. I had just been doing opt runs which doesn't even try to call echo_driver_messages. A debug run shows the same panic: https://treeherder.mozilla.org/#/jobs?repo=try&group_state=expanded&revision=fabf4962e9c411276814f0d23c1d25cdea0e65dd

Summary: Work around broken GetDebugMessageLog on android emulator with glutin-provided GL context → Work around broken GetDebugMessageLog on android emulator

As gw suggested we should be checking for the extension before trying to use it

Assignee: nobody → kats
Pushed by kgupta@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a8b4591d504e
Check for the KHR_debug extension before trying to use it. r=gw,kvark
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: