Block D3D9 on Windows 2000

VERIFIED FIXED in mozilla2.0b7

Status

()

Core
Graphics
VERIFIED FIXED
7 years ago
7 years ago

People

(Reporter: bas, Assigned: bas)

Tracking

Trunk
mozilla2.0b7
x86
Windows 2000
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(blocking2.0 beta7+)

Details

Attachments

(1 attachment)

(Assignee)

Description

7 years ago
We need to block D3D9 layers on windows 2000 since there's known issues with GetDC not working on textures on D3D9. It would require a lot of work to work around this so just blocking Win2K is a better idea.
(Assignee)

Comment 1

7 years ago
Created attachment 482146 [details] [diff] [review]
Block D3D9 on Windows 2000
Assignee: nobody → bas.schouten
Status: NEW → ASSIGNED
Attachment #482146 - Flags: review?(bjacob)
(Assignee)

Comment 2

7 years ago
We should probably block on this. We probably need to merge it to Beta 7 as well if we want Beta 7 to work on Win2K.
blocking2.0: --- → ?
Comment on attachment 482146 [details] [diff] [review]
Block D3D9 on Windows 2000

># HG changeset patch
># Parent e924456cff5812454aecb587b0c65203797ebd53
>
>diff --git a/widget/public/nsIGfxInfo.idl b/widget/public/nsIGfxInfo.idl
>--- a/widget/public/nsIGfxInfo.idl
>+++ b/widget/public/nsIGfxInfo.idl
>@@ -99,16 +99,18 @@ interface nsIGfxInfo : nsISupports
>   /* This feature is blocked on this driver version. Updating driver will typically unblock it. */
>   const long FEATURE_BLOCKED_DRIVER_VERSION = 2;
>   /* This feature is blocked on this device, regardless of driver version.
>    * Typically means we hit too many driver crashes without a good reason to hope for them to
>    * get fixed soon. */
>   const long FEATURE_BLOCKED_DEVICE = 3;
>   /* This feature is available and can be used, but is not suggested (e.g. shouldn't be used by default */
>   const long FEATURE_DISCOURAGED = 4;
>+  /* This feature is blocked on this OS version. */
>+  const long FEATURE_BLOCKED_OS_VERSION = 5;

If you add a new value here, please check existing code using GfxInfo (WebGL, and {D3D, D2D, GL} layers) as at least the WebGL code is checking for all BLOCKED values and therefore would be broken by adding a new BLOCKED value! See in content/canvas/src/WebGLContext.cpp:
            if (status == nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION ||
                status == nsIGfxInfo::FEATURE_BLOCKED_DEVICE)

>+  if (aFeature == FEATURE_DIRECT3D_9_LAYERS &&
>+      gfxWindowsPlatform::WindowsOSVersion() < gfxWindowsPlatform::kWindowsXP)
>+  {
>+    *aStatus = FEATURE_BLOCKED_OS_VERSION;
>+    return NS_OK;
>+  }

Don't add code when it's enough to add data! The existing code is reading the blocklist from the above-defined driverInfo[]. Just add an entry there.
Attachment #482146 - Flags: review?(bjacob) → review-
(In reply to comment #3)
> Comment on attachment 482146 [details] [diff] [review]
> Block D3D9 on Windows 2000
> 
> ># HG changeset patch
> ># Parent e924456cff5812454aecb587b0c65203797ebd53
> >
> >diff --git a/widget/public/nsIGfxInfo.idl b/widget/public/nsIGfxInfo.idl
> >--- a/widget/public/nsIGfxInfo.idl
> >+++ b/widget/public/nsIGfxInfo.idl
> >@@ -99,16 +99,18 @@ interface nsIGfxInfo : nsISupports
> >   /* This feature is blocked on this driver version. Updating driver will typically unblock it. */
> >   const long FEATURE_BLOCKED_DRIVER_VERSION = 2;
> >   /* This feature is blocked on this device, regardless of driver version.
> >    * Typically means we hit too many driver crashes without a good reason to hope for them to
> >    * get fixed soon. */
> >   const long FEATURE_BLOCKED_DEVICE = 3;
> >   /* This feature is available and can be used, but is not suggested (e.g. shouldn't be used by default */
> >   const long FEATURE_DISCOURAGED = 4;
> >+  /* This feature is blocked on this OS version. */
> >+  const long FEATURE_BLOCKED_OS_VERSION = 5;
> 
> If you add a new value here, please check existing code using GfxInfo (WebGL,
> and {D3D, D2D, GL} layers) as at least the WebGL code is checking for all
> BLOCKED values and therefore would be broken by adding a new BLOCKED value! See
> in content/canvas/src/WebGLContext.cpp:
>             if (status == nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION ||
>                 status == nsIGfxInfo::FEATURE_BLOCKED_DEVICE)

To be clear: the intent of the WebGL code here is to accept running even if the feature is DISCOURAGED. This is because it's currently our only way of running on Intel Graphics / Windows. By contrast, the D2D code and the layers code just check for NO_INFO, meaning they refuse to run with anything else including DISCOURAGED, because they are obviously more critical and at the same time the graphics acceleration there is "just" a performance improvement, as opposed to a feature.
Comment on attachment 482146 [details] [diff] [review]
Block D3D9 on Windows 2000

OK, r+ because this fix needs to go in beta 7 and The Right Fix would incur too invasive changes for that (need to introduce a new allVendors value here). Also the WebGL special case is not an immediate issue since there is no need to block WebGL here.

But this "right way" needs to be implemented asap!
Attachment #482146 - Flags: review- → review+
blocking2.0: ? → beta7+
Version: unspecified → Trunk
(In reply to comment #3)
[...snip...]
> If you add a new value here, please check existing code using GfxInfo (WebGL,
> and {D3D, D2D, GL} layers) as at least the WebGL code is checking for all
> BLOCKED values and therefore would be broken by adding a new BLOCKED value! See
> in content/canvas/src/WebGLContext.cpp:
>             if (status == nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION ||
>                 status == nsIGfxInfo::FEATURE_BLOCKED_DEVICE)

Sounds like there should be a static assert then about these values...
Blocks: 595471
(Assignee)

Comment 7

7 years ago
http://hg.mozilla.org/mozilla-central/rev/acffa474bd6d

Beta 7 branch:
http://hg.mozilla.org/mozilla-central/rev/d2af39f01c9e
Status: ASSIGNED → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
Blocks: 595481
V.Fixed per bug 595471.
Status: RESOLVED → VERIFIED
Flags: in-testsuite-
Target Milestone: --- → mozilla2.0b7
You need to log in before you can comment on or make changes to this bug.