Closed Bug 807669 Opened 12 years ago Closed 11 years ago

Provide better fallback for when DX10 is not available in Metro

Categories

(Core :: Widget: Win32, defect)

x86_64
Windows 8.1
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: bbondy, Assigned: bbondy)

References

Details

(Whiteboard: [metro-mvp][LOE:1][metro-it1][completed-elm])

Attachments

(1 file, 1 obsolete file)

When DX10 is not supported we should support a better fallback then just crashing. In particular we should instead launch the Desktop browser always even know we have Metro tile activation.

This may happen if the computer only supports DX9, or if there is some other type of problem with accelerating.
An idea - maybe add an about:support entry in desktop that tells whether the machine is metro browser compatible. Might be useful assuming we wouldn't be able to tell from the gfx info that's already exposed.
Agree that would be useful, I'll post for that inside Gfx and make it an LOE:1.  It's important because it'll enable Mozilla Support and will save us time from debugging.
Actually I think this would be the same as: GPU Accelerated Windows in about:support.
Summary: Add DX9 support for Windows 8 Metro builds → Provide better fallback for when DX10 is not available in Metro
Attached patch Patch v1 (obsolete) — Splinter Review
This bug adds detection for DX10 inside the CEH.

We currently do a similar check in gfx code itself, but I think it's best to do the check in the CEH.  If it's done in gfx only, then we have already launched the browser in one of the modes and we can't change that after startup.

In bug 810549 I'm going to change the similar gfx code to use the same registry setting instead of using a pref, to avoid the performance hit from bug 797013. In that bug I'll also delete the reg setting when DX10 becomes available after a hardware change.
Assignee: nobody → netzen
Attachment #680752 - Flags: review?(jmathies)
Comment on attachment 680752 [details] [diff] [review]
Patch v1

Review of attachment 680752 [details] [diff] [review]:
-----------------------------------------------------------------

::: browser/metro/shell/commandexecutehandler/CEHHelper.cpp
@@ +68,5 @@
> +  if (createDXGIFactory1) {
> +    HMODULE d3d10module = LoadLibraryA("d3d10_1.dll");
> +    D3D10CreateDevice1Func createD3DDevice =
> +      (D3D10CreateDevice1Func) GetProcAddress(d3d10module,
> +                                              "D3D10CreateDevice1");

Does a failure in createDXGIFactory1 below protect us from this failing? If not we should check the result.

::: browser/metro/shell/commandexecutehandler/Makefile.in
@@ +11,5 @@
>  
>  PROGRAMS_DEST = $(DIST)/bin
>  
> +PROGRAM = CommandExecuteHandler$(BIN_SUFFIX)
> +DIST_PROGRAM = CommandExecuteHandler$(BIN_SUFFIX)

You'll have to do a merge, this make file changed last week due to pgo build issues. I'm not sure what DIST_PROGRAM does but please be sure setting it doesn't break PGO builds again. :)
Attachment #680752 - Flags: review?(jmathies) → review+
> Does a failure in createDXGIFactory1 below protect us from this failing? 
> If not we should check the result.

I'll clean up that error checking a bit and carry forward the r+.

The SIMPLE_PROGRAMS stuff only allowed a single cpp file.  The DIST_PROGRAM and PROGRAM seems to be used for other applications like maintenance service and crash reporter.  I think it just specifies that it is to be built for the target dist and not a host machine OS bin.
Attached patch Patch v2Splinter Review
Some cleanup as per review comments. Carrying forward r+.
Attachment #680752 - Attachment is obsolete: true
Attachment #681145 - Flags: review+
Whiteboard: [metro-mvp][LOE:1] → [metro-mvp][LOE:1][metro-it1]
https://hg.mozilla.org/projects/elm/rev/287843a276d9
Whiteboard: [metro-mvp][LOE:1][metro-it1] → [metro-mvp][LOE:1][metro-it1][completed-elm]
Depends on: 829127
Closing .elm -> m-c. bug 829127 is tracking a regression.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
OS: Windows 8 Metro → Windows 8.1
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: