Remove compile-time option to disable ANGLE, replace it by an option to disable WebGL altogether (also disabling ANGLE)

RESOLVED FIXED in mozilla16



Canvas: WebGL
5 years ago
3 years ago


(Reporter: bjacob, Assigned: bjacob)


(Blocks: 1 bug)

Dependency tree / graph

Firefox Tracking Flags

(Not tracked)



(1 attachment, 2 obsolete attachments)

The --disable-angle --enable-webgl build setting doesn't make sense (WebGL really needs ANGLE) and has been broken inadvertently in bug 760323 (It's not tested). It's a better idea to just have a single --enable-webgl option (which is tested, as Thunderbird builds with WebGL disabled).

The only problem is I just realized that WebRTC has started to depend on d3dx9 which is a DLL that we only ship if ANGLE (i.e. if WebGL) is enabled.
-> WebRTC team, plz warn me next time!

So with this change, WebGL will become a build-time dependency for WebRTC, which IMO is quite OK since the code size increase from enabling WebGL is very small compared to the code size of that d3dx9 DLL anyway (2M). Also, we have a definite plan to stop shipping that DLL in the ANGLE makefiles (bug 741742) so if WebRTC wants to still use them, it will have to carry over the build-system work that we do currently for ANGLE (see and gfx/angle/ Anyway, it shouldn't block us from doing what makes the most sense for the build-system around WebGL.

Comment 1

5 years ago
Also, WebRTC: if you're using d3dx9, you'll run into exactly the same issue as bug 760323 with the WebRT apps and you'll have to preload this library manually for it to be found by WebRT apps.

Comment 2

5 years ago
In fact the bustage in 760323 was not about --disable-angle, it was about --disable-webgl. But I still think that we should do that.
No longer blocks: 760323


5 years ago
Blocks: 760323

Comment 3

5 years ago
Turns out that there is *no* --disable-webgl option! That's what we want to fix here.
Summary: Remove compile-time option to disable ANGLE (but keep the option to disable WebGL, which also disables ANGLE) → Remove compile-time option to disable ANGLE, replace it by an option to disable WebGL altogether (also disabling ANGLE)

Comment 4

5 years ago
Created attachment 640741 [details] [diff] [review]
add --disable-webgl, remove --disable-angle, clean up
Attachment #640741 - Flags: review?(vladimir)

Comment 5

5 years ago
Created attachment 640762 [details] [diff] [review]
add --disable-webgl, remove --disable-angle, clean up

This new version replaces MOZ_ANGLE by MOZ_ANGLE_RENDERER in remaining places.

(Indeed MOZ_ANGLE was poorly named since it only controls whether we want the GLES-ON-D3D stuff)
Attachment #640741 - Attachment is obsolete: true
Attachment #640741 - Flags: review?(vladimir)


5 years ago
Attachment #640762 - Flags: review?(vladimir)

Comment 6

5 years ago
Created attachment 640766 [details] [diff] [review]
add --disable-webgl, remove --disable-angle, clean up

Updated the error messages to stop pointing people to the now-removed --disable-angle option.
Attachment #640762 - Attachment is obsolete: true
Attachment #640762 - Flags: review?(vladimir)
Attachment #640766 - Flags: review?(vladimir)

Comment 7

5 years ago
So, what is left for us to do for WebRTC?  (Not knowing the interactions between GL, ANGLE, and dx*.)  If we need to pref something on by default if webrtc is prefed on, or pref off WEBRTC, or warn that they should be, let me know.

WebRTC may not need the dx9 renderer in the long term, as we'll be rendering to 'external' source (i.e. passing decoded data to a MediaStream that feeds to a <video> element).  The code has internal renderers so it can run stand-alone as well.

Comment 9

5 years ago
Most importantly you should evaluate whether you really need d3dx9.

If you really need d3dx9:
 - either you declare officially that WebGL is a build-time dependency for WebRTC i.e. --disable-webgl should also disable WebRTC at build time;
 - or you edit the build system so that we ship d3dx9_??.dll as long as WebRTC is enabled at build-time. Currently, we only ship it if WebGL is enabled at build time, which is the default, but can be disabled by --disable-webgl. By "currently" I mean "with my patches here".

If you do not really need d3dx9, remove the #include at and then you don't have anything to worry about.
Note that if you go down the route of editing the build system, the system-detection stuff is in (search for D3DX9) and the code actually extracting the DLL from the CAB archive is in gfx/angle/
Comment on attachment 640766 [details] [diff] [review]
add --disable-webgl, remove --disable-angle, clean up

Looks good to me..
Attachment #640766 - Flags: review?(vladimir) → review+
Blocks: 772577
Assignee: nobody → bjacob
Target Milestone: --- → mozilla16
Last Resolved: 5 years ago
Resolution: --- → FIXED
Blocks: 773143
Blocks: 1041670
You need to log in before you can comment on or make changes to this bug.