Closed Bug 1290333 Opened 8 years ago Closed 8 years ago

[WebGL2] Fix conformance test - drawingbuffer-static-canvas-test.html crash

Categories

(Core :: Graphics: CanvasWebGL, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla52
Tracking Status
firefox51 --- wontfix
firefox52 --- fixed

People

(Reporter: daoshengmu, Assigned: daoshengmu)

Details

Attachments

(1 file, 1 obsolete file)

This happens in Windows 8 x64 opt / Windows 8 x64 debug try-server.
Log:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=eae0056ed5ee

TEST-UNEXPECTED-FAIL | dom/canvas/test/webgl-conf/generated/test_2_conformance__canvas__drawingbuffer-static-canvas-test.html | application terminated with exit code 1
PROCESS-CRASH | dom/canvas/test/webgl-conf/generated/test_2_conformance__canvas__drawingbuffer-static-canvas-test.html | application crashed [@ nvoglv64.dll + 0xb0fac6]
TEST-UNEXPECTED-FAIL | leakcheck | default process: missing output line for total leaks!
Assertion failure: [GFX1]: Out of sync D3D11 devices in HandleError, 0, at c:\builds\moz2_slave\try-w64-d-00000000000000000000\build\src\obj-firefox\dist\include\mozilla/gfx/Logging.h:509
TEST-UNEXPECTED-FAIL | dom/canvas/test/webgl-mochitest/test_capture.html | application terminated with exit code 1

1289761 Intermittent dom/canvas/test/webgl-mochitest/test_capture.html | application crashed [@ mozilla::gfx::Log<1,mozilla::gfx::CriticalLogger>::WriteLog(std::basic_string<char,std::char_traits<char>,std::allocator<char> > const &)]
1284705 Intermittent dom/canvas/test/test_capture.html | application crashed [@ mozilla::layers::TextureClient::Lock(mozilla::layers::OpenMode)]

    1285785 Intermittent dom/canvas/test/test_capture.html | application timed out after 330 seconds with no output after Assertion failure: mIsLocked, at /builds/slave/m-in-m64-d-0000000000000000000/build/src/gfx/layers/client/TextureClient.cpp:444

Show / Hide more
PROCESS-CRASH | dom/canvas/test/webgl-mochitest/test_capture.html | application crashed [@ mozilla::gfx::Log<1,mozilla::gfx::CriticalLogger>::WriteLog(std::basic_string<char,std::char_traits<char>,std::allocator<char> > const &)]

1289761 Intermittent dom/canvas/test/webgl-mochitest/test_capture.html | application crashed [@ mozilla::gfx::Log<1,mozilla::gfx::CriticalLogger>::WriteLog(std::basic_string<char,std::char_traits<char>,std::allocator<char> > const &)]
1284705 Intermittent dom/canvas/test/test_capture.html | application crashed [@ mozilla::layers::TextureClient::Lock(mozilla::layers::OpenMode)]

    1285785 Intermittent dom/canvas/test/test_capture.html | application timed out after 330 seconds with no output after Assertion failure: mIsLocked, at /builds/slave/m-in-m64-d-0000000000000000000/build/src/gfx/layers/client/TextureClient.cpp:444

Show / Hide more
TEST-UNEXPECTED-FAIL | leakcheck | default process: missing output line for total leaks!
Return code: 1
Assignee: nobody → dmu
Summary: WebGL2] Fix conformance test - drawingbuffer-static-canvas-test.html crash in Windows 8 → [WebGL2] Fix conformance test - drawingbuffer-static-canvas-test.html crash in Windows 8
It will occur nvogl.dll crash at GLContext::IsFramebufferComplete (https://dxr.mozilla.org/mozilla-central/source/gfx/gl/GLScreenBuffer.cpp#949) when the framebuffer size changes to 16384 x 16384 in WebGL2.

Both GL_MAX_RENDERBUFFER_SIZE in WebGL 1 and 2 are 16384 x 16384. It is good in WebGL 1 because gl.MAX_VIEWPORT_DIMS is 32767 x 32767 in WebGL 1. After resize (divided by two) calculation, 32767 will be 16383.

However, gl.MAX_VIEWPORT_DIMS in WebGL 2 is 16384 x 16384. If we make mMaxRenderbufferSize be GL_MAX_RENDERBUFFER_SIZE - 1, it can be resolved.
I am not sure this is a good approach for getting operating system version. Probably, we have better way. Currently, I modify nsIGfxInfo.idl to help me can use OperatingSystemVersion(). There is an another problem that I need to discuss. If I follow-up this approach, I should make all different platform os version convert to OperatingSystem to be more readable?
Attachment #8778189 - Flags: feedback?(jgilbert)
Btw, I have tried different versions of NV driver but it is still happened. Therefore, I think it is OS dependent issue.
Blocks: 1295061
Attachment #8778189 - Flags: feedback?(jgilbert)
Comment on attachment 8781071 [details]
Bug 1290333 - Add framebuffer size test case;

https://reviewboard.mozilla.org/r/71568/#review70204

::: gfx/gl/GLContext.cpp:1076
(Diff revision 2)
>          mTextureAllocCrashesOnMapFailure = true;
>      }
>  #endif
>  
> +#ifdef XP_WIN
> +    // In some NVIDIA driver, the maximum of framebuffer size is not

Please add bug id here, just like other workarounds.
Attachment #8781071 - Flags: review?(ethlin) → review+
Comment on attachment 8781071 [details]
Bug 1290333 - Add framebuffer size test case;

https://reviewboard.mozilla.org/r/71568/#review70204

> Please add bug id here, just like other workarounds.

Thanks for review. I have added the bug no.
Comment on attachment 8781071 [details]
Bug 1290333 - Add framebuffer size test case;

https://reviewboard.mozilla.org/r/71568/#review73818

Also fix the patch title to say "framebuffer" not "frame buffer".

::: dom/canvas/test/webgl-mochitest/test_canvas_size.html:9
(Diff revision 3)
> +  <meta charset='UTF-8'>
> +  <script src='/tests/SimpleTest/SimpleTest.js'></script>
> +  <link rel='stylesheet' href='/tests/SimpleTest/test.css'>
> +  <script src="webgl-util.js"></script>
> +</head>
> +<title>WebGL test: Framebuffer maximum size test. #bug 1290333</title>

" (Bug 1290333)"

::: dom/canvas/test/webgl-mochitest/test_canvas_size.html:19
(Diff revision 3)
> +// Test WebGL 1
> +function TestWebGL1() {
> +  var attributes = {
> +    antialias: false,
> +  };
> +  var gl = WebGLUtil.getWebGL('c', false, attributes);

Create a canvas programatically (document.createElement) instead of using an HTML declaration.

::: dom/canvas/test/webgl-mochitest/test_canvas_size.html:31
(Diff revision 3)
> +
> +  ok(true, 'WebGL 1 test complete.');
> +}
> +
> +// Test WebGL 2
> +function TestWebGL2() {

Merge this with `TestWebGL1` into `TestSize(contextName, testSize)`.

::: gfx/gl/GLContext.cpp:1078
(Diff revision 3)
>  #endif
>  
> +#ifdef XP_WIN
> +    // Bug 1290333. In some NVIDIA driver, the maximum of framebuffer size
> +    // is not equal to GL_MAX_RENDERBUFFER_SIZE. It can only be created to
> +    // be less equal than 16383 x 16383. Otherwise, it will occur driver crash.

"Otherwise a the driver will crash."

::: gfx/gl/GLContext.cpp:1080
(Diff revision 3)
> +#ifdef XP_WIN
> +    // Bug 1290333. In some NVIDIA driver, the maximum of framebuffer size
> +    // is not equal to GL_MAX_RENDERBUFFER_SIZE. It can only be created to
> +    // be less equal than 16383 x 16383. Otherwise, it will occur driver crash.
> +    if (mWorkAroundDriverBugs &&
> +        mVendor == GLVendor::NVIDIA) {

This doesn't crash for me though? (Win+NV)
Please narrow the workaround to the particular card that is problematic.

Also, { on a new line if it's after a multi-line conditional.
Attachment #8781071 - Flags: review?(jgilbert) → review-
No longer blocks: 1295061
Summary: [WebGL2] Fix conformance test - drawingbuffer-static-canvas-test.html crash in Windows 8 → [WebGL2] Fix conformance test - drawingbuffer-static-canvas-test.html crash
It is happened on Windows 10 machine as well, https://treeherder.mozilla.org/#/jobs?repo=try&revision=bdad431a7c59&selectedJob=26759925.

This Win 10 machine uses NV GT 610, and driver version is 9.18.13.3523, 3-4-2014, GL 4.4. The environment is very similar to Win 8 machines. Need more investigation.
Please refer to this try result, https://treeherder.mozilla.org/#/jobs?repo=try&revision=13fa338c9394. We can find this issue only happens on Win 8 & Win 10. I think that is because both of them use NV GT 610.

For the cases of Win 7 VM, its GPU is NV GRID K520, and Win 7 machine (NV GT 610) didn't run WebGL 2 coconformance test.

Therefore, I think the root cause is Win + NV + GT 6 Series.
This issue only presents on NV-OpenGL case. After enabling ANGLE on WebGL 2 on Windows (Bug 1297965), it is no chance to happen. Thanks for Direct3D driver.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
I think we can still land test_canvas_size.html for helping us detect errors about framebuffer size.
Attachment #8778189 - Attachment is obsolete: true
Comment on attachment 8781071 [details]
Bug 1290333 - Add framebuffer size test case;

https://reviewboard.mozilla.org/r/71568/#review80208
Attachment #8781071 - Flags: review?(jgilbert) → review+
Keywords: checkin-needed
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/7013608fdbbc
Add framebuffer size test case; r=ethlin,jgilbert
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/7013608fdbbc
Status: REOPENED → RESOLVED
Closed: 8 years ago8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
Land on aurora.
Flags: needinfo?(jgilbert)
Flags: needinfo?(jgilbert)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: