Closed Bug 877949 Opened 11 years ago Closed 11 years ago

632781-verybig.html fails on 10.6/7 with OMTC

Categories

(Core :: Graphics: Layers, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla24

People

(Reporter: mattwoodrow, Assigned: mattwoodrow)

References

Details

Attachments

(1 file, 2 obsolete files)

I can reproduce this locally with my old machine (using an NVidia GeForce 9600M GT), and it gets fixed by enabling the 4096 max texture size implemented in bug 737182.

Try run: https://tbpl.mozilla.org/?tree=Try&rev=330df89a57d1

Try is currently closed, but I'll try get another run done soon to confirm that the same change fixes the bug there, and to print out what the vendor strings are.
Could bug 774689 be related to this?
I don't think so, that's windows only.
Try push with the driver workarounds condition set to all manufacturers, rather than just intel (http://mxr.mozilla.org/mozilla-central/source/gfx/gl/GLContext.cpp#564)

https://tbpl.mozilla.org/?tree=Try&rev=45c662a1af9f

All tests pass, so it appears that Nvidia cards are affected by this too.

10.6/7 return NVIDIA for the vendor string, 10.8 is using ATI (which is probably why the test passes there).
Attachment #756370 - Flags: review?(bjacob)
Comment on attachment 756370 [details] [diff] [review]
Workaround incorrect texture sizes for all drivers

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

This patch does something very severe: it limits max 2d texture, cube map, and renderbuffer sizes unconditionally on all macs. The cube map limit, in particular, is very low. That breaks a lot of WebGL content. If you only need the 2d texture limitation, or only need to do this on old Mac OS versions, then it's very much worth restricting the scope of this patch accordingly.
Attachment #756370 - Flags: review?(bjacob) → review-
Alright, that's fair. I was thinking of layers only, where we switch to tiling if the max texture size isn't big enough.

This patch only changes the texture size, for nvidia cards on 10.7 and below (10.8 seems to work fine).
Attachment #756370 - Attachment is obsolete: true
Attachment #758324 - Flags: review?(bjacob)
Comment on attachment 758324 [details] [diff] [review]
Workaround incorrect texture sizes

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

sorry, we'll need another quick round.

::: gfx/gl/GLContext.cpp
@@ +573,5 @@
> +                OSErr err1 = ::Gestalt(gestaltSystemVersionMajor, &major);
> +                OSErr err2 = ::Gestalt(gestaltSystemVersionMinor, &minor);
> +
> +                if (err1 != noErr || err2 != noErr ||
> +                    major < 10 || minor < 8) {

You want: major < 10 || (major == 10 && minor < 8).

Also, since this information is already queried elsewhere, have you checked if you could re-use already queried values? I would look around places like gfxPlatform, nsBaseWidget, GfxInfo... just by chance.

@@ +574,5 @@
> +                OSErr err2 = ::Gestalt(gestaltSystemVersionMinor, &minor);
> +
> +                if (err1 != noErr || err2 != noErr ||
> +                    major < 10 || minor < 8) {
> +                    mMaxTextureSize = std::min(mMaxTextureSize, 4096);

Please also apply the same limit to mMaxRenderbufferSize, as it's unlikely to work for larger sizes than 2D textures.
Attachment #758324 - Flags: review?(bjacob) → review-
We query the same values in nsBaseWidget (and not GfxInfo or gfxPlatform), but there's no easy way to share values between this code.
Attachment #758324 - Attachment is obsolete: true
Attachment #759591 - Flags: review?(bjacob)
Attachment #759591 - Flags: review?(bjacob) → review+
https://hg.mozilla.org/mozilla-central/rev/b40f8cdc7279
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: