|
a971e5b4
|
2024-02-28T17:13:38
|
|
Account for zero vector axes in Mat4::Rotate(...)
When the axis passed in to the Rotate function is (0, 0, 0), normalizing
that vector will result in NaN values. Prevent this by returning an
identity matrix and early out instead.
Bug: angleproject:2306
Tests: MatrixBuiltinsTest.RotateAxisZero
Change-Id: I65fd0b9944885daf56a4a35201d424e7f0aa9ba6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5333834
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
c9955641
|
2023-09-25T14:31:01
|
|
Avoid malloc in angle::Mat4 by using array instead of vector
angle::Matrix<float>::inverse() showed up in cpu profile of "minetest"
trace at ~10%. It's a gles1 trace. Multiple objects are constructed
and require malloc due to the use of std::vector.
Called here:
https://crsrc.org/c/third_party/angle/src/libANGLE/GLES1Renderer.cpp;drc=eb0d59973d21f845b5785563f5d56b8ebb617478;l=371
This CL decouples Mat4 from angle::Matrix (some of the functionality had
to be copied over) to switch from std::vector to std::array.
Testing "minetest" on a phone I saw a ~20% cpu power improvement due to
this CL.
There is an existing unit test coverage: MatrixUtilsTest.Mat4InvTr
Moved 4x4 cofactor matrix code to a helper with transposition included
Bug: b/301977186
Change-Id: I1e4c2201d19759dd37c0fee44fb44f4d24a58a6b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4885501
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Roman Lavrov <romanl@google.com>
|
|
b980c563
|
2018-11-27T11:34:27
|
|
Reformat all cpp and h files.
This applies git cl format --full to all ANGLE sources.
Bug: angleproject:2986
Change-Id: Ib504e618c1589332a37e97696cdc3515d739308f
Reviewed-on: https://chromium-review.googlesource.com/c/1351367
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
710aa5c7
|
2018-02-08T10:57:55
|
|
GLES1: Mat4 transform library
GLES1 has functions like glFrustum / glTranslatef which are baked 4x4
matrix operations. The purpose of this CL is to add those operations as
library functions in ANGLE, to make it convenient later on.
This is inspired by GLM and tested against GLM-generated numbers.
BUG=angleproject:2306
Change-Id: I3b428a115a935ee4f0d00585ad38745a38cc128c
Reviewed-on: https://chromium-review.googlesource.com/909578
Commit-Queue: Lingfeng Yang <lfy@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|