Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MacOS IOSurface bug in glCopyTexImage2D causes WebGL test failrues #25995

Open
asajeffrey opened this issue Mar 19, 2020 · 0 comments
Open

MacOS IOSurface bug in glCopyTexImage2D causes WebGL test failrues #25995

asajeffrey opened this issue Mar 19, 2020 · 0 comments

Comments

@asajeffrey
Copy link
Member

@asajeffrey asajeffrey commented Mar 19, 2020

According to https://searchfox.org/mozilla-central/rev/6cd54550a27e2f6ca0755a25328f769e41e524f4/gfx/gl/SharedSurfaceIO.cpp#39-44:

  /* Bug 896693 - OpenGL framebuffers that are backed by IOSurface on OSX expose
   * a bug in glCopyTexImage2D --- internalformats GL_ALPHA, GL_LUMINANCE,
   * GL_LUMINANCE_ALPHA return the wrong results. To work around, copy
   * framebuffer to a temporary texture using GL_RGBA (which works), attach as
   * read framebuffer and glCopyTexImage2D instead.
   */

referencing https://bugzilla.mozilla.org/show_bug.cgi?id=896693

This produces WebGL test failures using alpha and luminance with gl.copyTexImage2D, for example

  ▶ Unexpected subtest result in /_webgl/conformance/textures/misc/copy-tex-image-2d-formats.html:
  │ FAIL [expected PASS] WebGL test #2: should be 0,0,0,127\nat (0, 0) expected: 0,0,0,127 was 0,0,0,0
  │   → assert_true: should be 0,0,0,127
  │   → at (0, 0) expected: 0,0,0,127 was 0,0,0,0 expected true got false
  │ FAIL [expected PASS] WebGL test #5: should be 64,64,64,255\nat (0, 0) expected: 64,64,64,255 was 0,0,0,255
  │   → assert_true: should be 64,64,64,255
  │   → at (0, 0) expected: 64,64,64,255 was 0,0,0,255 expected true got false
  │ FAIL [expected PASS] WebGL test #8: should be 64,64,64,127\nat (0, 0) expected: 64,64,64,127 was 0,0,0,0
  │   → assert_true: should be 64,64,64,127
  │   → at (0, 0) expected: 64,64,64,127 was 0,0,0,0 expected true got false
  │ 
  │ reportTestResultsToHarness/<@http://web-platform.test:8000/_webgl/js/js-test-pre.js:123:24
  │ Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1958:25
  │ test@http://web-platform.test:8000/resources/testharness.js:548:30
  │ reportTestResultsToHarness@http://web-platform.test:8000/_webgl/js/js-test-pre.js:122:15
  │ testFailed@http://web-platform.test:8000/_webgl/js/js-test-pre.js:249:31
  │ checkCanvasRect/<@http://web-platform.test:8000/_webgl/js/webgl-test-utils.js:1269:19
  │ checkCanvasRectColor@http://web-platform.test:8000/_webgl/js/webgl-test-utils.js:1225:20
  │ checkCanvasRect@http://web-platform.test:8000/_webgl/js/webgl-test-utils.js:1257:23
  │ checkCanvas@http://web-platform.test:8000/_webgl/js/webgl-test-utils.js:1287:18
  │ testCopyTexImage2D@http://web-platform.test:8000/_webgl/conformance/textures/misc/copy-tex-image-2d-formats.html:188:7
  │ testFormats@http://web-platform.test:8000/_webgl/conformance/textures/misc/copy-tex-image-2d-formats.html:133:23
  └ @http://web-platform.test:8000/_webgl/conformance/textures/misc/copy-tex-image-2d-formats.html:91:12

We should adopt the same workround as FF.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.