Closed Bug 986811 Opened 10 years ago Closed 10 years ago

Use the latest d3dcompiler dll if available

Categories

(Core :: Graphics: CanvasWebGL, defect)

All
Windows 8.1
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla31

People

(Reporter: emk, Assigned: emk)

Details

Attachments

(1 file, 1 obsolete file)

On Windows 8.1, d3dcompiler_47.dll is available from the system directory.
Attached patch patch (obsolete) — Splinter Review
Attachment #8395196 - Flags: review?(mshal)
Comment on attachment 8395196 [details] [diff] [review]
patch

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

::: gfx/gl/GLLibraryEGL.cpp
@@ +112,5 @@
>  
>  #ifndef MOZ_D3DCOMPILER_DLL
>  #error MOZ_D3DCOMPILER_DLL should have been defined by the Makefile
>  #endif
> +        if (!LoadLibrarySystem32(L"d3dcompiler_47.dll")) {

We should go down a fallback list of drivers we want to try to load:
_47, then _46, then I guess just the _43 that we ship with.
Attachment #8395196 - Flags: review?(mshal) → review-
Attached patch patch v2Splinter Review
(In reply to Jeff Gilbert [:jgilbert PTO through Mar26] from comment #2)
> We should go down a fallback list of drivers we want to try to load:
> _47, then _46, then I guess just the _43 that we ship with.

_46 will never be in the system directory. It doesn't make sense to test the version. _43 and lower will be in the directory if DirectX End User Runtime is installed, but we ship at least _43. So it doesn't make sense to test those lower versions either.
So this code will test as follows:
1. Try _47 in the system directory first (for Win 8.1).
2. Then try the whatever version we shipped with.
I added a comment to clarify that.
Attachment #8395196 - Attachment is obsolete: true
Attachment #8395296 - Flags: review?(mshal)
Attachment #8395296 - Flags: review?(mshal) → review?(jgilbert)
Comment on attachment 8395296 [details] [diff] [review]
patch v2

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

::: gfx/gl/GLLibraryEGL.cpp
@@ +115,5 @@
>  #endif
> +        // Windows 8.1 has d3dcompiler_47.dll in the system directory.
> +        // Try it first. Note that _46 will never be in the system
> +        // directory and we ship with at least _43. So there is no point
> +        // trying _46 and _43 in the system directory.

Thanks for the comment!
Attachment #8395296 - Flags: review?(jgilbert) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/91a4c3026e8a
Assignee: nobody → VYV03354
Status: NEW → ASSIGNED
https://hg.mozilla.org/mozilla-central/rev/1a7225121967
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: