Commit graph

237 commits

Author SHA1 Message Date
Kelsey Gilbert
5dfdf0bcda Bug 1793526 - Remove IsCurrent checks in webgl code. r=gfx-reviewers,lsalzman
Webgl uses mImplicitMakeCurrent these days, so don't worry about it
directly.

Differential Revision: https://phabricator.services.mozilla.com/D188524
2023-09-19 22:04:17 +00:00
Chris Peterson
468401c1af Bug 1850883 - Remove always-true OnHighSierraOrLater() and OnCatalinaOrLater() version checks. r=gfx-reviewers,lsalzman
And stop including nsCocoaFeatures.h where it's no longer needed.

Firefox versions >= 116 only support macOS >= 10.15. High Sierra is macOS 10.13. Catalina is macOS 10.15.

Differential Revision: https://phabricator.services.mozilla.com/D187645
2023-09-07 23:07:57 +00:00
Kelsey Gilbert
7a17e909ef 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
c41e3f4330 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
91a9368bb8 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
Lee Salzman
5e17cdc939 Bug 1800301 - Use Vector instead of custom inlining_vector. r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D162083
2022-11-15 08:05:09 +00:00
Kelsey Gilbert
186c6dca7d Bug 1800301 - Reduce allocs and ptr-chasing in ScopedResolveTexturesForDraw. r=gfx-reviewers,lsalzman
+ Add inlining_vector<T,N>, like AutoTArray, but using std::vector for
  familiarity and safety.

Differential Revision: https://phabricator.services.mozilla.com/D162059
2022-11-15 04:11:16 +00:00
Narcis Beleuzu
0171c10fa3 Backed out changeset f5a6e0827824 (bug 1800301) for mochitest failure on WebGLContextDraw.cpp . CLOSED TREE 2022-11-12 21:18:23 +02:00
Kelsey Gilbert
02e71dba97 Bug 1800301 - Reduce allocs and ptr-chasing in ScopedResolveTexturesForDraw. r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D161940
2022-11-12 18:48:06 +00:00
Kelsey Gilbert
2e7f5f28e7 Bug 1798703 - Enforce alignment for UniformData via union rather than overalignment. r=lsalzman
Reverts the overalignment from bug 1794237.

Differential Revision: https://phabricator.services.mozilla.com/D161360
2022-11-07 07:24:43 +00:00
Kelsey Gilbert
a8b77633d6 Bug 1778549 - Don't crash on validation failure in ReadPixelsPbo. r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D153423
2022-08-03 06:10:31 +00:00
Kelsey Gilbert
4416195118 Bug 1743767 - Tighten bounds and add asserts for row-by-row ReadPixels. r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D144900
2022-05-12 03:23:40 +00:00
Kelsey Gilbert
8b0e3105a0 Bug 1760726 - Failed webgl.linkProgram on CURRENT_PROGRAM should cause draws to fail. r=gfx-reviewers,lsalzman
Hack tests to test new behavior.
Eventually we'll take the full updates with a full CTS update.

Differential Revision: https://phabricator.services.mozilla.com/D141708
2022-03-25 20:11:19 +00:00
Kelsey Gilbert
aeeb1e199d Bug 1750310 - Centralize and reuse pixelstorei pack/unpack handling. r=lsalzman
* Accept that finding an explicit unpack for a given stride might fail.
* Directly use the logic from the GLES spec for unpacking stride calculations.
* Use structuredSrcSize member.
* Calc explicit unpack based on dstStride, not srcStride.

Differential Revision: https://phabricator.services.mozilla.com/D136052
2022-02-12 02:20:42 +00:00
Kelsey Gilbert
213f39f6e5 Bug 1749302 - Validate mode for webgl.hint(). r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D137378
2022-01-31 02:59:26 +00:00
Jeff Gilbert
fa284e5717 Bug 1726265 - Prototype webgl draft ext OES_draw_buffers_indexed. r=lsalzman,emilio,webidl
Differential Revision: https://phabricator.services.mozilla.com/D122916
2021-08-27 01:47:14 +00:00
Butkovits Atila
477919f37c Backed out changeset a4a346ecefd7 (bug 1726265) for causing failures at test_2_conformance2__extensions__oes-draw-buffers-indexed.html. CLOSED TREE 2021-08-21 01:46:52 +03:00
Jeff Gilbert
28e862be2d Bug 1726265 - Prototype webgl draft ext OES_draw_buffers_indexed. r=lsalzman,emilio
Differential Revision: https://phabricator.services.mozilla.com/D122916
2021-08-20 20:59:54 +00:00
Cosmin Sabou
135d55cd7e Backed out changeset 24e0d3aa4ada (bug 1726265) for causing non-unified build bustage. CLOSED TREE 2021-08-20 04:29:04 +03:00
Jeff Gilbert
df78036187 Bug 1726265 - Prototype webgl draft ext OES_draw_buffers_indexed. r=lsalzman,emilio
Differential Revision: https://phabricator.services.mozilla.com/D122916
2021-08-20 00:05:06 +00:00
Jeff Gilbert
4121499edb Bug 1715690 - Generalize WebGL RENDERER into large buckets. r=lsalzman
+ Minor reduction in unused flexibility of limits.

Differential Revision: https://phabricator.services.mozilla.com/D117385
2021-06-14 21:27:08 +00:00
Butkovits Atila
c5dac06788 Backed out changeset 45887183c584 (bug 1715690) for causing failures at SanitizeRenderer. CLOSED TREE 2021-06-12 04:12:18 +03:00
Jeff Gilbert
de085c82e3 Bug 1715690 - Generalize WebGL RENDERER into large buckets. r=lsalzman
+ Minor reduction in unused flexibility of limits.

Differential Revision: https://phabricator.services.mozilla.com/D117385
2021-06-11 23:54:39 +00:00
Iulian Moraru
6dd0299bc3 Backed out changeset 67b696ec70a9 (bug 1715690) for causing build bustages on SanitizeRenderer.cpp. CLOSED TREE 2021-06-11 02:46:23 +03:00
Jeff Gilbert
22fa9e93cf Bug 1715690 - Generalize WebGL RENDERER into large buckets. r=lsalzman
+ Minor reduction in unused flexibility of limits.

Differential Revision: https://phabricator.services.mozilla.com/D117385
2021-06-10 22:55:50 +00:00
Jeff Gilbert
47dcac63b7 Bug 1638568 - E.g. uniform1i(null, ...) should check avail len not total len. r=lsalzman
Also:
* Propagate null-location UniformDatas to host
* Move transpose validation to host-side

Differential Revision: https://phabricator.services.mozilla.com/D98243
2020-11-30 22:00:23 +00:00
Jeff Gilbert
860e935ec8 Bug 1663214 - Explain what format/types ReadPixels expects. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D92500
2020-10-06 19:02:58 +00:00
Jeff Gilbert
e3e331e9ad Bug 1658433 - Implement WebGL draft extension EXT_texture_norm16. r=lsalzman,webidl,smaug
Differential Revision: https://phabricator.services.mozilla.com/D86630
2020-08-12 15:19:17 +00:00
Jeff Gilbert
f25a4cdbe8 Bug 1607940 - IPC TexImage. r=lsalzman,nika,handyman
Differential Revision: https://phabricator.services.mozilla.com/D83291
2020-07-21 22:57:01 +00:00
Jeff Gilbert
35f892e782 Bug 1607940 - Stand up webgl.out-of-process:true path. r=handyman,nika,froydnj
* Use clearer pref names.
* Default (and only support) IPDL dispatching.
* Make DispatchCommands async-only.
* Sync ipdl command per sync webgl entrypoint.
  * Eat the boilerplate cost, since there's not too many.
* Run SerializedSize off same path as Serialize.
* All shmem uploads go through normal DispatchCommands.
* Defer pruning of dead code for now so we can iterate quickly.
* Use Read/Write(begin,end) instead of (begin,size).
  * This would have prevented a bug where we read/wrote N*sizeof(T)*sizeof(T).

Differential Revision: https://phabricator.services.mozilla.com/D81495
2020-07-21 22:56:52 +00:00
Jeff Gilbert
aa48742190 Bug 1636517 - When detaching a webgl fb attachment, reset params to defaults. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D77177
2020-05-27 22:51:40 +00:00
Imanol Fernandez
0806eab98a Bug 1631823 - Disable XRWebGLLayer antialias by default on WebGL 2. Add support to enable behind a pref. r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D71782
2020-04-27 18:03:03 +00:00
nicolaspacheco
9ac972aca4 Bug 1626776 - Delete redundant return statement at the end of a function with a void return type. r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D70144

--HG--
extra : moz-landing-system : lando
2020-04-08 03:36:00 +00:00
Imanol Fernandez
9035f18d3a Bug 1614499 - Implement XRWebGLLayer r=jgilbert,daoshengmu
Differential Revision: https://phabricator.services.mozilla.com/D62809

--HG--
extra : moz-landing-system : lando
2020-04-07 18:48:13 +00:00
Jeff Gilbert
91ab854fc8 Bug 1617785 - Optimize GetDrawFetchLimits and vertexAttribPointer. r=lsalzman
Our goal here is to just be fast enough that we don't need to cache.

Differential Revision: https://phabricator.services.mozilla.com/D64215

--HG--
extra : moz-landing-system : lando
2020-02-26 00:44:26 +00:00
Jeff Gilbert
1abd55a851 Bug 1616715 - Make ReadPixelDesc per-call. r=lsalzman
GetSurfaceSnapshot (and similar) want to ReadPixels the backbuffer,
without having to navigate the GL PIXEL_PACK state.
Since this is cold cold code, it's nice to reduce the backend state by
making ReadPixelsDesc/PixelPackState per-call, and tracked by the
client. Arguably, PIXEL_PACK_BUFFER should be per-call as well.

Differential Revision: https://phabricator.services.mozilla.com/D63587

--HG--
extra : moz-landing-system : lando
2020-02-21 03:12:41 +00:00
Viresh Gupta
96552e75e7 Bug 1612981 - Remove MatrixAxBToRowMajor r=jgilbert
Remove unused code from dom/canvas/WebGLContextGL.cpp

Differential Revision: https://phabricator.services.mozilla.com/D61664

--HG--
extra : moz-landing-system : lando
2020-02-11 01:11:27 +00:00
Jeff Gilbert
0dfd1a2a0d Bug 1477756 - Fix all webgl regression tests according to CI. r=handyman
(This is a combination of 31 commits)

* Fix Linux compilation.

* Fix mac compilation.

* CI compile fixes.

* printf's size_t is %zu. %tu would be unsigned ptrdiff_t.

* No non-ref Maybe args.

* MOZ_CRASH for noreturn

* Handle implied texture sizes, rewrite comment stripping.

* Replace e.g. WebGLProgramInner with simpler webgl::ProgramKeepAlive.

* Bounce ValidateProgram call off driver.

* Uniform name length limit, cubemap fb-attach, non-array uniforms, undersized texImage views.

* alignas for uint8_t[sizeof(float)*N] pun buffers.

* CC fixes?

* Fill attrib0Active.

* Repair max-warnings limit.

* This is basically required in order for CI's logging to not explode.

* Don't cache WebGLMemoryTracker.

* Deleted prog/shader error, no texSubImage(null), client-side fingerprint resist for exts.

* Fix GetUniformIndices and MakeRangeFromView.

* CC Traverse base class from within derived class to fix leaking the world. :(

* PauseTransformFeedback
* TexImage video fastpath
* GetFragLocation for arrays
* Forbid BindBufferRange during TF

* Mark tests and fix RBAB query and test.

* Change(!) query deletion behavior to match spec.
* Mark conformance2/query/query.html failing for now.

* Implicitly EndQuery on DeleteQuery while spec is in flux.

* Fix error code for test.

* RAII LruPosition for WebGL context limit.

* Include std::list.

* Mark CompileResult and LinkResult.pending as false when retrieved.

* Hold strong-ref to NotLostData during Run<> to prevent LoseContext=>UAF.

* Don't assume GetUniformLocation(foo+'[0]') means foo is an array.
* Don't assume !mCanvasElement means !!mOffscreenCanvas.

* Handle composition while context-lost.

* All non-value-init members must be const or have inline init.

* Mark passing tests on Linux.

Depends on D54019

Differential Revision: https://phabricator.services.mozilla.com/D55739

--HG--
extra : moz-landing-system : lando
2020-01-08 22:19:23 +00:00
Jeff Gilbert
e1d0fe64bb Bug 1477756 - Client-side bindings mirror for precise CC, and merge similar codepaths. r=handyman
* Context loss using RAII
* Move Program reflection Client-side

Depends on D54018

Differential Revision: https://phabricator.services.mozilla.com/D54019

--HG--
extra : moz-landing-system : lando
2020-01-08 22:19:16 +00:00
David Parks
198fa063c2 Bug 1477756 - Initial out-of-process WebGL implementation. r=mccr8,handyman
Splits WebGLContext into ClientWebGLContext and HostWebGLContext.  The Client enables the JS-control of a WebGL context in a content procecss while the Host executes the WebGL graphics operations (via a WebGLContext that maintains much of the existing code) in the compositor process.  At this point, the cross-process behavior is disabled -- this series of patches is an incremental step toward that final goal.

Differential Revision: https://phabricator.services.mozilla.com/D54018

--HG--
extra : moz-landing-system : lando
2020-01-08 22:19:14 +00:00
Chris Peterson
406763af7f Bug 1570499 - Part 1: Replace MOZ_FALLTHROUGH macro with C++17's [[fallthrough]] attribute. r=froydnj
This changeset is a simple find and replace of `MOZ_FALLTHROUGH` and `[[fallthrough]]`.

Unfortunately, the MOZ_FALLTHROUGH_ASSERT macro (to assert on case fallthrough in debug builds) is still necessary after switching from [[clang::fallthrough]] to [[fallthrough]] because:

* MOZ_ASSERT(false) followed by [[fallthrough]] triggers a -Wunreachable-code warning in DEBUG builds
* but MOZ_ASSERT(false) without [[fallthrough]] triggers a -Wimplicit-fallthrough warning in NDEBUG builds.

Differential Revision: https://phabricator.services.mozilla.com/D56440

--HG--
extra : moz-landing-system : lando
2019-12-20 07:16:43 +00:00
Jeff Gilbert
047e98938e Bug 1536672 - Implement WebGL OVR_multiview2 behind draft flag. r=lsalzman,qdot
Also disable clang-format for gfx/gl/GLConsts.h.

Differential Revision: https://phabricator.services.mozilla.com/D28168

--HG--
extra : moz-landing-system : lando
2019-05-23 20:48:21 +00:00
Mihai Alexandru Michis
354eec452c Backed out changeset a649f69f29df (bug 1536672) for failing crashtest at WebGLContextValidate.cpp. CLOSED TREE 2019-05-23 10:57:29 +03:00
Jeff Gilbert
fb7050f9bf Bug 1536672 - Implement WebGL OVR_multiview2 behind draft flag. r=lsalzman,qdot
Also disable clang-format for gfx/gl/GLConsts.h.

Differential Revision: https://phabricator.services.mozilla.com/D28168

--HG--
extra : moz-landing-system : lando
2019-05-23 02:43:11 +00:00
jgilbert@mozilla.com
a5ef1cc2e1 Bug 1372177 - ArrayBufferView error enum depends on func. r=lsalzman
MozReview-Commit-ID: 34X7yTEE3Ia

Differential Revision: https://phabricator.services.mozilla.com/D18482

--HG--
extra : moz-landing-system : lando
2019-02-02 10:04:43 +00:00
Jeff Gilbert
aed7c05c6c Bug 1521994 - ReadPixels with half-float ext should support FLOAT. r=lsalzman
MozReview-Commit-ID: ZjVnkJLJrl

Differential Revision: https://phabricator.services.mozilla.com/D17307

--HG--
extra : moz-landing-system : lando
2019-01-31 19:18:09 +00:00
Jeff Gilbert
b03f03b25b Bug 1523030 - glClear after glBlitFramebuffer with mNeedsFakeNoAlpha. r=lsalzman
glBlitFramebuffer ignores glColorMask, unlike glClear, so we have to do
a fix-up.

Eventually we should drop mNeedsFakeNoAlpha, though.

Differential Revision: https://phabricator.services.mozilla.com/D17717

--HG--
extra : moz-landing-system : lando
2019-01-26 00:55:57 +00:00
Ehsan Akhgari
e5e885ae31 Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre
# ignore-this-changeset

--HG--
extra : amend_source : 7221c8d15a765df71171099468e7c7faa648f37c
extra : histedit_source : a0cce6015636202bff09e35a13f72e03257a7695
2019-01-18 10:16:18 +01:00
Tooru Fujisawa
7983faeb5d Bug 1511393 - Use c-basic-offset: 2 in Emacs mode line for C/C++ code. r=nbp 2018-12-01 04:52:05 +09:00
Sylvestre Ledru
265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00