Closed Bug 603204 Opened 14 years ago Closed 14 years ago

Block D3D9 on Windows 2000

Categories

(Core :: Graphics, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla2.0b7
Tracking Status
blocking2.0 --- beta7+

People

(Reporter: bas.schouten, Assigned: bas.schouten)

References

Details

Attachments

(1 file)

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: nobody → bas.schouten
Status: NEW → ASSIGNED
Attachment #482146 - Flags: review?(bjacob)
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+
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...
http://hg.mozilla.org/mozilla-central/rev/acffa474bd6d

Beta 7 branch:
http://hg.mozilla.org/mozilla-central/rev/d2af39f01c9e
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
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.

Attachment

General

Created:
Updated:
Size: