Closed Bug 1621523 Opened 4 years ago Closed 4 years ago

Firefox 74 has drawing issues with Amazon Sumerian Editor

Categories

(Core :: Graphics: CanvasWebGL, defect, P1)

74 Branch
Desktop
Windows 10
defect

Tracking

()

VERIFIED FIXED
mozilla76
Webcompat Priority P1
Tracking Status
firefox-esr68 --- unaffected
firefox73 --- unaffected
firefox74 --- wontfix
firefox75 --- verified
firefox76 --- verified

People

(Reporter: deirdret, Assigned: jgilbert)

References

(Regressed 1 open bug, Regression, )

Details

(Keywords: regression)

Attachments

(9 files, 1 obsolete file)

Attached image drawing failure.png —

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36

Steps to reproduce:

We updated to Firefox 74, and opened a scene in the Sumerian editor

Actual results:

Objects in the 3D Sumerian scene are not visible, only the grid. When viewed in play mode, with the grid disabled, we can see the objects rendered correctly. Based on Spector js captures, our conclusion is that the three transparent layers we have in the editor: gridRendering, cameraDebugRendering and LightDebugRendering, are not blending with underneath canvas the same way they did in previous versions. Instead, they are now overriding the canvas.

We are attempting to resolve the issue, but are reduced to diffing various builds until we find one that works. Do you all know of any changes to 3d blending or drawing schemas that may have changed in 74? Any help to resolve this issue would be appreciated.

I will update later with an observable scene, if possible

Expected results:

The 3D scene was previously drawing correctly.

Here is a Sumerian scene which is reproducing the issue. on FF74, the white box will not be visible

https://cff70084960a4674ba74c27903e361bc.us-east-2.sumerian.aws/

an example of another level opened in FF74, to be compared with a pic of the same level loaded in chrome

Attached image visible in Chrome81.png —

Same level loaded in chrome

Attached file hardware config —

hardware and browser config from the machine loading the scene in FF74 and chrome

Status: UNCONFIRMED → NEW
Has Regression Range: --- → yes
Has STR: --- → yes
Component: Untriaged → Canvas: WebGL
Ever confirmed: true
Keywords: regression
OS: Unspecified → Windows 10
Product: Firefox → Core
Regressed by: 1609006
Hardware: Unspecified → Desktop

Jeff, can you take a look? thanks

Flags: needinfo?(jgilbert)

Jeff is looking at this!

Assignee: nobody → jgilbert
Flags: needinfo?(jgilbert)
Priority: -- → P1

Hello!
If it's at all helpful, my devs have been doing a bunch of investigating, think the issue may have been introduced around Jan 15th, in this build: https://archive.mozilla.org/pub/firefox/nightly/2020/01/2020-01-15-09-38-07-mozilla-central/

Comment #c5 pinpointed the regressing cset, but the bug in that change isn't obvious to me. I can reproduce it locally, and I'm able to reproduce it in a webgl record+replay. (replay even works in Chrome, same bug in Firefox) Next I'll be figuring out what's up by playing with the recording.

If there's anything we can provide to simplify your debugging and/or search, please let me know!

The main changed functionality that jumps out at me from comment 5 is that now every width/height assignment counts as an attempted Resize, at least on the Client side. I'm guessing that the issue is with colorMask/depthMask and WebGLContext::Resize.

I bet it's depthMask, since the broken rendering we see in Firefox is only the grid-lines, which is a surprising partial rendering.

Attached file testcase-sumerian-mask.html (obsolete) —

Chrome has a green dot, buggy Firefox has a blue dot.

Attached file testcase-sumerian-mask2.html —

It looks like we're just clearing the depth buffer when we shouldn't.

Attachment #9132748 - Attachment is obsolete: true
Attached file testcase-sumerian-mask3.html —

Resize() calls PresentScreenbuffer(), which with preserveDrawingBuffer:false, clears all the buffers, resetting both color and depth.

The workaround is simple: Don't assign to canvas.width/height if they're already the values you want.

Alternatively, you can use preserveDrawingBuffer:true for the time being.

Deirdre - jgilbert has two recommendations for potential workarounds in the two comments above. We will also uplift a patch on our end to Firefox Beta so this will be fixed in the next release.

Flags: needinfo?(deirdret)

Great, thank you very much! We are looking into implementing your suggested work-arounds, and will update here on how it goes!

Flags: needinfo?(deirdret)
Webcompat Priority: --- → P1

Update: We were able to successfully work around the issue, and have released an update. Thank you all very much for your help!

Confirmed fix with the CTS test and the testcases HTMLs attached to this bug. URL link has been updated so it no longer repros on Firefox.

One question for you all - this issue continues to impact scenes that were published in older versions of our tool... would it be possible to hotfix FF74, rather than having to ask all of our customers to republish if their scenes are experiencing difficulties in FF74?

I don't think we can hotfix 74 at this point. Generally once changes as published to Release in Firefox, (as it is in Chrome) the bar for patching is very high.
Once it hits release, if it's not a security problem or something we can easily disable, it's generally WONTFIX.
To prevent this in the future, you really need to be testing in Firefox Nightly, or at least in Beta.

Pushed by jgilbert@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c997932b6bfe
WebGL: Don't Present on no-op Resize. r=lsalzman
https://hg.mozilla.org/integration/autoland/rev/12e09fef3c3f
Revendor WebGL CTS with new test.

Ok, understandable.

We unfortunately have hit a snag with the workaround - while it works with the test level we had provided, it does not ctually work with the Sumerian Editor. Can we set you up with the Editor to take another look?

Pushed by jgilbert@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a39217483d29
WebGL: Don't Present on no-op Resize. r=lsalzman
https://hg.mozilla.org/integration/autoland/rev/73572c522da8
Revendor WebGL CTS with new test.
Flags: needinfo?(jgilbert)
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla76

Comment on attachment 9133292 [details]
Bug 1621523 - WebGL: Don't Present on no-op Resize.

Beta/Release Uplift Approval Request

  • User impact if declined: Incomplete rendering in some content. (e.g. Amazon Sumerian editor)
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: Testcases attached to this bug should look the same as they do in Chrome.
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Low risk because the change is small, and uses existing machinery.
  • String changes made/needed: none
Attachment #9133292 - Flags: approval-mozilla-beta?
Attachment #9133293 - Flags: approval-mozilla-beta?
Flags: qe-verify+

Comment on attachment 9133293 [details]
Bug 1621523 - Revendor WebGL CTS with new test.

Don't uplift the test updates.

Attachment #9133293 - Flags: approval-mozilla-beta?

(In reply to Deirdre Toomey from comment #29)

Ok, understandable.

We unfortunately have hit a snag with the workaround - while it works with the test level we had provided, it does not ctually work with the Sumerian Editor. Can we set you up with the Editor to take another look?

Can you try replacing instances of canvas.width = x; with if (canvas.width != x) canvas.width = x;?

Flags: needinfo?(deirdret)

Comment on attachment 9133292 [details]
Bug 1621523 - WebGL: Don't Present on no-op Resize.

webgl regression fix, approved for 75.0b5

Attachment #9133292 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
QA Whiteboard: [qa-triaged]

Let me see...

Flags: needinfo?(deirdret)

wait - that's exactly what we did

it worked for the published scene, but not the Sumerian Editor

(In reply to Deirdre Toomey from comment #40)

it worked for the published scene, but not the Sumerian Editor

Is the Editor fixed in Nightly now?

Flags: needinfo?(deirdret)

I'm confused - Was there a change checked in from your side?

Flags: needinfo?(deirdret)

(In reply to Deirdre Toomey from comment #42)

I'm confused - Was there a change checked in from your side?

  • An up-to-date Nightly should have the fix for all testcases in this bug
    • but I don't know if it fixed the Editor too
    • (The next Beta build we publish should also be fixed, but it might not be out yet)
  • I think I saw that you published a workaround that fixed the published scenes in affected versions

If you still see a bug in the Editor in up-to-date Nightly, please file a new bug for it.

Flags: needinfo?(deirdret)

Deirdre - if you do still see the issue with your Editor, can you also send us info on how we can reproduce that on our end? (Not sure if we'd need access to the editor somehow)

Using the test cases from Comment 15 and 16 I was able to confirm this issue Verified as Fixed on Windows 10 using Beta 75.0b5 and our latest Nightly build: 76.0a1 (2020-03-16).

I will update the flags for this issue and if the issue still occurs we can log a new issue for the Editor. I tried to test this issue on the Sumerian Editor but it needs a valid account.

Status: RESOLVED → VERIFIED
QA Whiteboard: [qa-triaged]
Flags: qe-verify+

Ok. Yes, this issue is fixed for the test scenes on FF74 we created to attempt to reproduce it, but are still happening in the editor on some machines, which requires a free AWS account to access. I will create a new ticket with instructions for how to best access and reproduce. Thanks!

We will also test against the nightly to see if it fixes the editor issues for FF75. (assuming my understanding here correct?)

Flags: needinfo?(deirdret)

That's correct. The editor seems to work the same as Chrome now for me.

(In reply to Deirdre Toomey from comment #46)

Ok. Yes, this issue is fixed for the test scenes on FF74 we created to attempt to reproduce it, but are still happening in the editor on some machines, which requires a free AWS account to access. I will create a new ticket with instructions for how to best access and reproduce. Thanks!

We will also test against the nightly to see if it fixes the editor issues for FF75. (assuming my understanding here correct?)

FWIW Nightly is now FF76, and Beta is 75.

See Also: → 1622975
Regressions: 1634708
See Also: → 1629783
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: