Closed Bug 1703654 Opened 3 years ago Closed 2 years ago

Prototype display-p3 display support for webgl on mac+ca

Categories

(Core :: Graphics: CanvasWebGL, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
102 Branch
Tracking Status
firefox102 --- fixed

People

(Reporter: jgilbert, Assigned: jgilbert)

References

(Blocks 1 open bug, )

Details

(Keywords: perf-alert)

Attachments

(2 files)

We should prototype it to ensure we're speccing the right thing.

Do you have an idea of what work all needs to happen for this?

Flags: needinfo?(jgilbert)

Roughly:

  1. Add p3 to our colorspace enums
  2. Implement the API surface proposed here: https://github.com/KhronosGroup/WebGL/pull/3292
  3. Support separate OS layer webgl canvases marked as p3
  4. Tone map(?) p3 canvases into an otherwise-srgb page/wr-rendertarget

For prototyping, I think we can skip 4 for now, though we should be thinking about what we want to do here. I'm not sure what the HTML spec says (will say?) about this.

Flags: needinfo?(jgilbert)

So having a P3 canvas only effects how it is interpreted by the outside world? What happens if you do texSubImage(ImageElement)? What colorspace should the image be decoded to?

Flags: needinfo?(jgilbert)

Defined in https://github.com/KhronosGroup/WebGL/pull/3292, generally we would do conversion between spaces. (We basically do this already for YUV content, so this is sort of part of #1)

Flags: needinfo?(jgilbert)

Enable (direct) external surface compositing for MacIOSurfaces.
Works on Mac.

Assignee: nobody → jgilbert
Status: NEW → ASSIGNED
Pushed by jgilbert@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/071aa43a0419
Prototype display-p3 for WebGL canvas. r=lsalzman,emilio

Backed out changeset 071aa43a0419 (bug 1703654) for causing build bustages in SharedSurfaceDMABUF.

Backout link: https://hg.mozilla.org/integration/autoland/rev/a4c8cdae300f6ed787c8961ae3d4780772f1d161

Push with failures

Failure log

Flags: needinfo?(jgilbert)

Oh, hah, of course, platform-specific-compiled code

Pushed by jgilbert@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/718ead395698
Prototype display-p3 for WebGL canvas. r=lsalzman,emilio

Backed out for causing bustages on IPCMessageUtils.h

[task 2022-04-28T21:19:41.524Z] 21:19:41     INFO -  /builds/worker/workspace/obj-build/dist/include/mozilla/dom/WebGLIpdl.h:237:14:   required from here
[task 2022-04-28T21:19:41.525Z] 21:19:41    ERROR -  /builds/worker/workspace/obj-build/dist/include/ipc/IPCMessageUtils.h:66:3: error: static assertion failed: PlainOldDataSerializer can only be used with trivially copyable types!
[task 2022-04-28T21:19:41.525Z] 21:19:41     INFO -     static_assert(
[task 2022-04-28T21:19:41.525Z] 21:19:41     INFO -     ^~~~~~~~~~~~~
[task 2022-04-28T21:19:41.525Z] 21:19:41     INFO -  /builds/worker/workspace/obj-build/dist/include/ipc/IPCMessageUtils.h: In instantiation of 'struct IPC::PlainOldDataSerializer<mozilla::WebGLContextOptions>':
[task 2022-04-28T21:19:41.526Z] 21:19:41     INFO -  /builds/worker/workspace/obj-build/dist/include/mozilla/dom/WebGLIpdl.h:219:8:   required from 'struct IPC::ValidatedPlainOldDataSerializer<mozilla::WebGLContextOptions>'
[task 2022-04-28T21:19:41.526Z] 21:19:41     INFO -  /builds/worker/workspace/obj-build/dist/include/mozilla/dom/WebGLIpdl.h:247:14:   required from here
[task 2022-04-28T21:19:41.526Z] 21:19:41    ERROR -  /builds/worker/workspace/obj-build/dist/include/ipc/IPCMessageUtils.h:66:3: error: static assertion failed: PlainOldDataSerializer can only be used with trivially copyable types!
[task 2022-04-28T21:19:41.527Z] 21:19:41    ERROR -  gmake[4]: *** [/builds/worker/checkouts/gecko/config/rules.mk:659: OffscreenCanvasDisplayHelper.o] Error 1
[task 2022-04-28T21:19:41.527Z] 21:19:41     INFO -  gmake[4]: Leaving directory '/builds/worker/workspace/obj-build/dom/canvas'
[task 2022-04-28T21:19:41.527Z] 21:19:41    ERROR -  gmake[3]: *** [/builds/worker/checkouts/gecko/config/recurse.mk:72: dom/canvas/target-objects] Error 2
[task 2022-04-28T21:19:41.527Z] 21:19:41     INFO -  gmake[3]: *** Waiting for unfinished jobs....
Flags: needinfo?(jgilbert)
Flags: needinfo?(jgilbert)

Oookay, Maybe<enum class> isn't trivially copyable on old gcc?

Flags: needinfo?(jgilbert)

Start moving away from manual (risky!) IsTriviallySerializable<>.

Attachment #9274695 - Attachment description: Bug 1703654 - Deal with Maybe<> not trivially_copyable on old GCC. → Bug 1703654 - Deal with Maybe<> not trivially_copyable on build-linux64-base-toolchains.
Pushed by jgilbert@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/bd0bcbae38bd
Prototype display-p3 for WebGL canvas. r=lsalzman,emilio,webidl,smaug
https://hg.mozilla.org/integration/autoland/rev/f2d46bb91c9d
Deal with Maybe<> not trivially_copyable on build-linux64-base-toolchains. r=gfx-reviewers,lsalzman
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 102 Branch

== Change summary for alert #34063 (as of Fri, 06 May 2022 18:45:56 GMT) ==

Improvements:

Ratio Test Platform Options Absolute values (old vs new)
61% glterrain macosx1015-64-shippable-qr e10s fission stylo webrender-sw 3.42 -> 1.34
61% glterrain macosx1015-64-shippable-qr e10s fission stylo webrender-sw 3.43 -> 1.34
20% glterrain macosx1015-64-shippable-qr e10s fission stylo webgl-ipc webrender 1.84 -> 1.47
18% glterrain macosx1015-64-shippable-qr e10s fission stylo webrender 1.81 -> 1.48

For up to date results, see: https://treeherder.mozilla.org/perfherder/alerts?id=34063

Keywords: perf-alert
Blocks: 1771373
Summary: Prototype display-p3 support for webgl → Prototype display-p3 display support for webgl on mac+ca
Regressions: 1769254
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: