Closed Bug 1736793 Opened 3 years ago Closed 2 years ago

Add SurfaceTexture support to GLBlitHelper::BlitSdToFramebuffer()

Categories

(Core :: Graphics: CanvasWebGL, enhancement)

Unspecified
Android
enhancement

Tracking

()

RESOLVED FIXED
98 Branch
Tracking Status
firefox98 --- fixed

People

(Reporter: sotaro, Assigned: sotaro)

References

(Blocks 1 open bug)

Details

Attachments

(2 files, 1 obsolete file)

Blit support of SurfaceTexture was removed by Bug 1640607.

Assignee: nobody → sotaro.ikeda.g
Blocks: 1709661
Attachment #9246805 - Attachment description: WIP: Bug 1736793 - Add SurfaceTexture support to GLBlitHelper::BlitSdToFramebuffer() → Bug 1736793 - Add SurfaceTexture support to GLBlitHelper::BlitSdToFramebuffer()
OS: Unspecified → Android

I confirmed that that the patch work with pref "media.geckoview.autoplay.request" = false on geckoview example app at the following.
https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Tutorial/Animating_textures_in_WebGL

Blocks: 1709726
Blocks: 1526207
Attached video npot-video-1920x1080.mpeg (obsolete) —
Attachment #9248829 - Attachment is obsolete: true

(In reply to Sotaro Ikeda [:sotaro] from comment #4)

The test is disabled on emulator.
https://searchfox.org/mozilla-central/rev/011ed92913b38e950977ab3fc56ae68a8f3bca12/dom/canvas/test/webgl-conf/generated-mochitest.ini#6

It seems that "textureSize(tex, 0).y" == 0 when TexUnpackImage::TexOrSubImage() was used.
"textureSize(tex, 0).y" was valid when TexUnpackSurface::TexOrSubImage() (slow path)was used.

:jgilbert, do you have any ideas about why textureSize(tex, 0).y" was 0?

Flags: needinfo?(jgilbert)

I have tested this patch on Oculus Quest 2 using this sample: https://immersive-web.github.io/webxr-samples/stereo-video.html

I found two problems:

  • The video is upside down
  • There is some flickering only when the video plays (are we missing any makeCurrent() calls?)

There's a r+ patch which didn't land and no activity in this bug for 2 weeks.
:sotaro, could you have a look please?
For more information, please visit auto_nag documentation.

Flags: needinfo?(sotaro.ikeda.g)
Flags: needinfo?(jgilbert)

(In reply to Sotaro Ikeda [:sotaro] from comment #7)

(In reply to Sotaro Ikeda [:sotaro] from comment #4)

The test is disabled on emulator.
https://searchfox.org/mozilla-central/rev/011ed92913b38e950977ab3fc56ae68a8f3bca12/dom/canvas/test/webgl-conf/generated-mochitest.ini#6

It seems that "textureSize(tex, 0).y" == 0 when TexUnpackImage::TexOrSubImage() was used.
"textureSize(tex, 0).y" was valid when TexUnpackSurface::TexOrSubImage() (slow path)was used.

textureSize == 0 is generally from incomplete textures, or maybe we just never initialized it.
It's possible for e.g. TEXTURE_MIN_FILTER to default to trying to mipmap, which will cause incomplete textures like this.
My guess is either the upload is failing or the filter is asking for mipmaps and causing an "incomplete" texture.

Flags: needinfo?(jgilbert)
Pushed by sikeda.birchill@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c333871e1c59
Add SurfaceTexture support to GLBlitHelper::BlitSdToFramebuffer() r=jgilbert,gfx-reviewers
Flags: needinfo?(sotaro.ikeda.g)
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 98 Branch
Duplicate of this bug: 1709661
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: