Commit Graph

161 Commits

Author SHA1 Message Date
Kelsey Gilbert
b200d7247f Bug 1940870 - Prefer std::unique_ptr in dom/canvas/webgl*. r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D233786
2025-01-10 02:39:09 +00:00
Kelsey Gilbert
a57dfcc948 Bug 1932784 - Reduce #include of WebGLFormats.h in headers. r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D229864
2024-12-04 11:13:49 +00:00
Sandor Molnar
0a5179c08b Backed out 4 changesets (bug 1932784) for causing build bustages @ nsWaylandDisplay.h
Backed out changeset 904eb3043370 (bug 1932784)
Backed out changeset b13e482a5c6f (bug 1932784)
Backed out changeset 22dd30bf7d5a (bug 1932784)
Backed out changeset f8762853ca6e (bug 1932784)
2024-11-23 13:38:54 +02:00
Kelsey Gilbert
d7a034c706 Bug 1932784 - Reduce #include of WebGLFormats.h in headers. r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D229864
2024-11-23 04:09:00 +00:00
Brad Werth
ed9166951f Bug 1885446 Part 1: Stub the WebGL unpackColorSpace attribute. r=jgilbert,webidl,smaug
This is a stub so webidl reviewers can review this without having to review
the implementation. This is not attempting to do anything with
unpackColorSpace other than ensure that it is get and set in the same
ways that are used for drawingBufferColorSpace.

Differential Revision: https://phabricator.services.mozilla.com/D214053
2024-09-10 23:27:57 +00:00
Kelsey Gilbert
ef3160faba Bug 1909372 - Remove WebGLContextAttributes.colorSpace. r=gfx-reviewers,webidl,lsalzman,saschanaz
The WebGL spec never added this, and WebGL expects this to change via
drawingBufferColorSpace, so I don't think we should push for a spec
addition for .colorSpace.

Differential Revision: https://phabricator.services.mozilla.com/D217350
2024-07-23 18:02:41 +00:00
Jamie Nicol
9526c88d05 Bug 1898238 - Don't call TexTypeForWebgl when initializing offscreen canvas. r=aosmond,jgilbert
This is only used if the OffscreenCanvas has a webgl context, in which
case it forwards the tex type to WebGLContext::PresentFrontBuffer(). A
later patch in this series will make TexTypeForWebgl() return a
different value depending on whether the webgl context is in-process
or remote, which is something that cannot be known when the
OffscreenCanvas is initialized. This patch therefore removes the field
from OffscreenCanvas and makes WebGLContext::PresentFrontBuffer() call
TexTypeForWebgl() itself.

Differential Revision: https://phabricator.services.mozilla.com/D211289
2024-07-22 20:23:37 +00:00
Iulian Moraru
724263a29c Backed out 5 changesets (bug 1898238) for causing non unified build bustages on RenderEGLImageTextureHost.cpp. CLOSED TREE
Backed out changeset ae8e94c8f819 (bug 1898238)
Backed out changeset 549abd685d11 (bug 1898238)
Backed out changeset 6359e558d765 (bug 1898238)
Backed out changeset 332c668a15bc (bug 1898238)
Backed out changeset 19fa8d4af66f (bug 1898238)
2024-07-22 20:27:45 +03:00
Jamie Nicol
ae417c018f Bug 1898238 - Don't call TexTypeForWebgl when initializing offscreen canvas. r=aosmond,jgilbert
This is only used if the OffscreenCanvas has a webgl context, in which
case it forwards the tex type to WebGLContext::PresentFrontBuffer(). A
later patch in this series will make TexTypeForWebgl() return a
different value depending on whether the webgl context is in-process
or remote, which is something that cannot be known when the
OffscreenCanvas is initialized. This patch therefore removes the field
from OffscreenCanvas and makes WebGLContext::PresentFrontBuffer() call
TexTypeForWebgl() itself.

Differential Revision: https://phabricator.services.mozilla.com/D211289
2024-07-22 16:02:33 +00:00
Kelsey Gilbert
2fc4d570e3 Bug 1885032 - Support EXT_depth_clamp in webgl. r=gfx-reviewers,webidl,lsalzman,smaug
Differential Revision: https://phabricator.services.mozilla.com/D215713
2024-07-17 21:12:23 +00:00
Kelsey Gilbert
8ee0e704a2 Bug 1892542 - Webgl e.g. createBuffer() made infallible. r=gfx-reviewers,webidl,saschanaz,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D208050
2024-07-08 17:24:12 +00:00
Kelsey Gilbert
f72ec6e498 Bug 1885447 - Tonemap/color-manage webgl sdr/wcg output into Display profile as pre-compositor post-process. r=gfx-reviewers,webidl,smaug,ahale
Differential Revision: https://phabricator.services.mozilla.com/D207651
2024-05-06 23:36:51 +00:00
Stanca Serban
8996a6a522 Backed out changeset 995596d4362c (bug 1885447) for causing build bustages in AutoMappable.h. CLOSED TREE 2024-04-23 22:19:00 +03:00
Kelsey Gilbert
7393b7c768 Bug 1885447 - Tonemap/color-manage webgl sdr/wcg output into Display profile as pre-compositor post-process. r=gfx-reviewers,webidl,smaug,ahale
Differential Revision: https://phabricator.services.mozilla.com/D207651
2024-04-23 16:54:05 +00:00
Kelsey Gilbert
3590c64ad0 Bug 1887335 - ClientWaitSync warns when forgetting to flush. r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D206296
2024-04-02 20:36:26 +00:00
Kelsey Gilbert
4a79a6f495 Bug 1887335 - AutoEnqueueFlush in FenceSync, EnqueueError/Warning. r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D206295
2024-04-02 20:36:25 +00:00
Kelsey Gilbert
e4080e620a Bug 1887335 - Poll=4ms for WebGLSync completion, async-notify child. r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D206294
2024-04-02 20:36:25 +00:00
Kelsey Gilbert
af33d3ce1a Bug 1886214 - Cache PWebGL::IsEnabled. r=gfx-reviewers,lsalzman,ipc-reviewers,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D205091
2024-03-21 17:37:41 +00:00
Narcis Beleuzu
a420dc78ba Backed out changeset 68318849486e (bug 1886214) for webgl failure on test_2_conformance2__extensions__oes-draw-buffers-indexed.html 2024-03-20 04:14:02 +02:00
unknown
8b4d30f9af Bug 1886214 - Cache PWebGL::IsEnabled. r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D205091
2024-03-20 01:22:49 +00:00
Kelsey Gilbert
d9f415a3d4 Bug 1878930 - s/RawBuffer/Span/: ReadPixels. r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D202023
2024-02-29 00:37:28 +00:00
Kelsey Gilbert
001a04e5b2 Bug 1878930 - s/RawBuffer/Span/: Buffer(Sub)Data, Invalidate(Sub)Framebuffer. r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D202022
2024-02-29 00:37:28 +00:00
Sandor Molnar
d9c4b21b0d Backed out 7 changesets (bug 1878930) for causing build bustages @ dom/canvas/WebGLTypes.h CLOSED TREE
Backed out changeset 631db0feebb4 (bug 1878930)
Backed out changeset 72ab4dbbf8ed (bug 1878930)
Backed out changeset e5119acd8c8f (bug 1878930)
Backed out changeset 3cd4b2423281 (bug 1878930)
Backed out changeset 4a5512ff4424 (bug 1878930)
Backed out changeset 6f5c64075e31 (bug 1878930)
Backed out changeset fb3b3487a529 (bug 1878930)
2024-02-20 21:25:02 +02:00
Kelsey Gilbert
c50cc3dbf5 Bug 1878930 - s/RawBuffer/Span/: ReadPixels. r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D202023
2024-02-20 17:59:07 +00:00
Kelsey Gilbert
d6b80ba920 Bug 1878930 - s/RawBuffer/Span/: Buffer(Sub)Data, Invalidate(Sub)Framebuffer. r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D202022
2024-02-20 17:59:06 +00:00
Lee Salzman
25a04a247d Bug 1877010 - Track forwarder transaction ids for RemoteTextureMap with WebGL and WebGPU. r=sotaro
Differential Revision: https://phabricator.services.mozilla.com/D199876
2024-01-30 15:44:04 +00:00
Kelsey Gilbert
7ea4efbaf1 Bug 1876818 - ClientWebGLContext::Run serialization now coerces to HostWebGLContext arg types. r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D199768
2024-01-30 00:15:10 +00:00
Stanca Serban
d637e86042 Backed out changeset 7b7eadc28250 (bug 1876818) for causing hazard-linux bustage in ClientWebGLContext.h. CLOSED TREE 2024-01-27 09:55:16 +02:00
Kelsey Gilbert
5d1f17b38f Bug 1876818 - ClientWebGLContext::Run serialization now coerces to HostWebGLContext arg types. r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D199768
2024-01-27 02:46:24 +00:00
Lee Salzman
be8b918d1b Bug 1829026 - Remove unused ClientWebGLContext local extensions. r=jgilbert,aosmond
DrawTargetWebgl is transitioning away from using ClientWebGLContext, so
local extensions that were added to support that use-case are no longer necessary.

Differential Revision: https://phabricator.services.mozilla.com/D194346
2023-12-18 18:10:44 +00:00
Sebastian Hengst
cdce9d5ae9 Backed out 10 changesets (bug 1829026) for causing bug 1869760 and bug 1869738. a=backout
Backed out changeset 4c619422efe5 (bug 1829026)
Backed out changeset 77da89c7dab7 (bug 1829026)
Backed out changeset 19d28d8f75a4 (bug 1829026)
Backed out changeset 674b60ba54b1 (bug 1829026)
Backed out changeset 31935f164ef0 (bug 1829026)
Backed out changeset 13c9bf69085f (bug 1829026)
Backed out changeset 330a6732fc0b (bug 1829026)
Backed out changeset 974c08a3791b (bug 1829026)
Backed out changeset 3ba040642ddc (bug 1829026)
Backed out changeset 9d9b3a68858c (bug 1829026)
2023-12-13 19:20:00 +01:00
Lee Salzman
5e38cdd61d Bug 1829026 - Remove unused ClientWebGLContext local extensions. r=jgilbert,aosmond
DrawTargetWebgl is transitioning away from using ClientWebGLContext, so
local extensions that were added to support that use-case are no longer necessary.

Differential Revision: https://phabricator.services.mozilla.com/D194346
2023-12-12 07:35:01 +00:00
Cosmin Sabou
088aba68e8 Backed out 8 changesets (bug 1829026) for causing several mochitest failures. CLOSED TREE
Backed out changeset 790ba6aa65e4 (bug 1829026)
Backed out changeset 2ff1f5f41380 (bug 1829026)
Backed out changeset de6ddf5eb2a7 (bug 1829026)
Backed out changeset 773e7b31ac6e (bug 1829026)
Backed out changeset e09602ab096d (bug 1829026)
Backed out changeset fe16d4ac1049 (bug 1829026)
Backed out changeset c0fe0aea86c2 (bug 1829026)
Backed out changeset 53d6f69055f1 (bug 1829026)
2023-12-05 16:08:36 +02:00
Lee Salzman
9fefc77110 Bug 1829026 - Remove unused ClientWebGLContext local extensions. r=jgilbert,aosmond
DrawTargetWebgl is transitioning away from using ClientWebGLContext, so
local extensions that were added to support that use-case are no longer necessary.

Differential Revision: https://phabricator.services.mozilla.com/D194346
2023-12-05 09:37:01 +00:00
Andrew Osmond
461b1b50c5 Bug 1781526 - Implement means to use VideoFrame with WebGL. r=webidl,smaug,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D181118
2023-09-20 22:40:24 +00:00
Peter Van der Beken
e664ec3758 Bug 1690111 - Use new TypedArray APIs for processing data. r=farre,media-playback-reviewers,padenot,chunmin,sfink
Depends on D152497

Differential Revision: https://phabricator.services.mozilla.com/D152498
2023-09-20 09:42:02 +00:00
Cosmin Sabou
c3effd7450 Backed out 13 changesets (bug 1690111) for causing fetch related crashes.
Backed out changeset 5f2c25d194ad (bug 1690111)
Backed out changeset 76c408bcd053 (bug 1690111)
Backed out changeset 6d0649fdafff (bug 1690111)
Backed out changeset c1330b5e8c43 (bug 1690111)
Backed out changeset 5fa36d8fd2a5 (bug 1690111)
Backed out changeset daf7d747853a (bug 1690111)
Backed out changeset f70e09a7f5c6 (bug 1690111)
Backed out changeset 40c6d6eed7f8 (bug 1690111)
Backed out changeset 692f2a759573 (bug 1690111)
Backed out changeset 7140866dd9f6 (bug 1690111)
Backed out changeset 2865fe682139 (bug 1690111)
Backed out changeset 9dcd2416f8a5 (bug 1690111)
Backed out changeset 9c411bf84079 (bug 1690111)
2023-09-11 17:55:24 +03:00
Peter Van der Beken
312137a408 Bug 1690111 - Use new TypedArray APIs for processing data. r=farre,media-playback-reviewers,padenot,chunmin,sfink
Depends on D152497

Differential Revision: https://phabricator.services.mozilla.com/D152498
2023-09-11 12:52:20 +00:00
sotaro
369536c473 Bug 1839314 - Force sync IPC if there are many flushed cmds without calling ClientWebGLContext::GetFrontBuffer() r=ipc-reviewers,nika,gfx-reviewers,lsalzman
There were cases that a lot of cmds messages were sent by WebGLChild::FlushPendingCmds() without calling ClientWebGLContext::GetFrontBuffer(). And the IPC messages were waiting to be handled by WebGLParent, since OpenGL handling could take longer. Then there were cases that pending IPC messages were accumulated and it caused out of file descriptor on Linux. The sync IPC could reduce the pending IPC messages if there are a lot of cmds flashes.

async Ping is used for checking if IPC message is congested at WebGLParent. If a count of flushes since last congestion check reaches maybeIPCMessageCongestion, we think that IPC message is congested at WebGLParent. Then send sync SyncPing message to flush pending IPC messages.

Differential Revision: https://phabricator.services.mozilla.com/D181484
2023-06-27 18:23:41 +00:00
sotaro
881b5464a5 Bug 1831548 - Force sync IPC if there are many flushed cmds between GetFrontBuffer() r=gfx-reviewers,lsalzman
Enabling async remote texture removes sync IPC PWebGLChild::SendGetFrontBuffer(). With the change, there are cases that pending IPC messages are accumulated and it caused out of file descriptor. The sync IPC SendGetFrontBuffer() could reduce the pending IPC messages if there are a lot of cmds flashes.

Differential Revision: https://phabricator.services.mozilla.com/D181033
2023-06-15 08:41:57 +00:00
Tim Huang
711f354ff0 Bug 1816189 - Part 3: Moving ShouldResistFingerprinting() to nsICanvasRenderingContextInternal from ClientWebCLContext and add a RFPTarget as an input argument. r=tjr,lsalzman
This patch moves ShouldResistFingerprinting() and add a RFPTarget as
input argument. We will use this function to check if canvas
fingerprinting protection is enabled.

We also modify the caller to pass the right RFPTarget for Canvas image
data extraction prompt. Note that, we need to set the default argument
for the function to known because it's used for WebGL fingerprinting
protection too. However, We don't cut over this part in this patch and
will do it in a future bug.

Differential Revision: https://phabricator.services.mozilla.com/D175608
2023-05-08 14:04:34 +00:00
Kelsey Gilbert
e5132654ba Bug 1829756 - E.g. DeleteTexture in ~WebGLTextureJS. r=gfx-reviewers,lsalzman
Otherwise GCing will not release them.

Differential Revision: https://phabricator.services.mozilla.com/D176828
2023-05-01 20:20:23 +00:00
Kelsey Gilbert
d3bfd8e092 Bug 1826678 - Add webgpu CanvasContext.canvas backlink. r=gfx-reviewers,webidl,jimb,smaug,ErichDonGubler
Differential Revision: https://phabricator.services.mozilla.com/D174831
2023-04-13 19:15:00 +00:00
Jamie Nicol
443e931b81 Bug 1826134 - Avoid interleaving glBufferSubData calls with draw calls in DrawTargetWebgl. r=gfx-reviewers,jgilbert,lsalzman
DrawTargetWebgl renders a path by uploading vertex data to the back of
a large VBO using glBufferSubData then issuing a draw call, orphaning
the buffer when it becomes full. This results in many glBufferSubData
calls being interleaved with draw calls. On Mali GPUs this causes
severe performance issues as the driver is unable to determine that
any pending draw calls do not reference the updated region of the
buffer, and therefore must create a copy of the buffer for each
update.

However, since *we* know that we never overwrite a region that is
referenced by a submitted draw call, we can force the driver to avoid
making these copies. We do so by adding a new function
UnsynchronizedBufferSubData(), which acts like BufferSubData so long
as this rule is followed. Internally, this uses glMapBufferRange with
GL_MAP_UNSYNCHRONIZED_BIT, allowing the driver to omit the extraneous
copies.

Differential Revision: https://phabricator.services.mozilla.com/D174685
2023-04-07 07:25:50 +00:00
Kelsey Gilbert
7ca5d9164c Bug 1822867 - Only generate "ClientWaitSync not ready yet" warning after 100th time. r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D172806
2023-04-03 21:23:30 +00:00
Kelsey Gilbert
a136c10eb3 Bug 1825673 - Implement WEBGL_provoking_vertex. r=gfx-reviewers,webidl,lsalzman,saschanaz
Differential Revision: https://phabricator.services.mozilla.com/D174197
2023-04-01 00:33:25 +00:00
Noemi Erli
ac328fe39f Backed out changeset bc8c5f1973ff (bug 1825673) for causing mochitest failures in test_GridElementWidthResizer.html CLOSED TREE 2023-03-31 23:14:09 +03:00
Kelsey Gilbert
9d47482195 Bug 1825673 - Implement WEBGL_provoking_vertex. r=gfx-reviewers,webidl,lsalzman,saschanaz
Differential Revision: https://phabricator.services.mozilla.com/D174197
2023-03-31 18:48:20 +00:00
Kelsey Gilbert
ecd474bc06 Bug 1812932 - Add size outvar to GetImageBuffer. r=gfx-reviewers,bradwerth
Differential Revision: https://phabricator.services.mozilla.com/D171764
2023-03-21 18:05:09 +00:00
Cristina Horotan
4f0c1988f7 Backed out changeset 7657d29cd872 (bug 1812932) for causing bc failures at browser_view_image.js CLOSED TREE 2023-03-07 09:26:40 +02:00