Commit Graph

7555 Commits

Author SHA1 Message Date
Mathias Agopian
76e36cd87b try to cleanup android libraries cmake build
- make as many library deps private as possible
- try to keep the same structure between the CMakeList.txt files
- for gltfio use libgltfio_core.a
2025-09-04 11:28:28 -07:00
Mathias Agopian
60da554732 draco: fix c++20 warnings 2025-09-04 11:27:47 -07:00
Mathias Agopian
5613663686 create an update script for draco and update readme
note that updating to a recent version is still difficult because
of makefile changes. we can do that later.
2025-09-04 11:27:47 -07:00
Mathias Agopian
57e308b75f fix linear fog parameters calculation
FIXES=[442852042]
2025-09-04 11:27:27 -07:00
Mathias Agopian
d07c15dfc6 zbloat: modernize script
The script uses os.system to execute external commands like nm and 
objdump. Instead we use the subprocess module, which is the recommended 
approach in modern Python. 
Properly handle potential errors if nm or objdump fail.
2025-09-04 08:37:18 -07:00
Mathias Agopian
1422116242 zbloat: fix warnings 2025-09-04 08:37:18 -07:00
Mathias Agopian
28fcbe2b77 zbloat: add support for .a 2025-09-04 08:37:18 -07:00
Ben Doherty
2535d1b5d9 Implement setFrameScheduledCallback on other backends (#9177) 2025-09-04 11:09:26 -04:00
Mathias Agopian
4c91d48ed3 Revert "use fmin/fmax for floating-point"
This reverts commit a032190b24.
2025-09-04 00:08:30 -07:00
Mathias Agopian
a032190b24 use fmin/fmax for floating-point
On ARM this generates the fmin/fmax instruction, which avoids
branches.
2025-09-03 22:30:09 -07:00
Mathias Agopian
639cdc3e5c add option to disable perfetto on android
The new cmake FILAMENT_ENABLE_PERFETTO must be set to enable 
perfetto traces on Android. It is disabled by default on release
builds, enabled otherwise.

The reason for this is that the perfetto SDK adds about 800K of code
to the library. The text section goes from 2.2 to 1.4 MB
2025-09-03 16:16:46 -07:00
Sungun Park
b0f8e1be7a Add getEyeFromViewMatrix() for vertex shader (#9175)
This new method, intended for the vertex shader, returns a matrix that
transforms vertices from view space (also known as head space) to the
current eye space.

BUGS=[441127971]
2025-09-03 18:05:34 +00:00
Ben Doherty
3bd6412780 Remove the setDebugTag API in favor of tagged create API (#9011) 2025-09-03 11:14:33 -04:00
Powei Feng
9fad497fa0 Enable c++20 for Android and iOS (#9150)
- Fix Android cmake files
- Change iOS samples to use c++20
2025-09-03 00:28:14 +00:00
Doris Wu
ae5ebda397 Get actual backend type from the engine (#9171) 2025-09-02 22:27:35 +00:00
Ben Doherty
58dc6715c9 iOS: avoid use of typeof (#9173) 2025-09-02 19:24:22 +00:00
Mathias Agopian
d3ff60af21 remove all uses of std::string in filament
- libbackend (except webgpu)
- libfilament
- libutils

std::string generates a lot of code bloat, we use CString instead.

We also update CString to be more compatible with std::string's api.
2025-09-02 11:47:58 -07:00
Filament Bot
1c2fe0ce39 [automated] Updating /docs due to commit f875dc2
Full commit hash is f875dc2c08

DOCS_ALLOW_DIRECT_EDITS
2025-09-02 18:33:11 +00:00
Powei Feng
f875dc2c08 Release Filament 1.64.1 2025-09-02 11:17:37 -07:00
Powei Feng
19e1287392 Fix minor typo and styling issues (#9172) 2025-09-02 18:11:09 +00:00
Powei Feng
7d1a09773e vk: fix readpixels validation error (#9155)
The semaphore stages between command buffer didn't consider the
data buffers (UBOS, vertices, indices) being shared across command
buffers

BUG=436853814
2025-09-02 17:44:35 +00:00
Mathias Agopian
05a6198443 froxelization optimizations
- by limiting the maximum number of point light to 255 instead of 256,
  we can simplify some loops.

- hint the compiler that certain loop counters are multiple of 16 and 
non 0, which helps vectorizing.
2025-08-29 14:46:14 -07:00
Mathias Agopian
00bd30c21b zLightNear and zLightFar are now clamped
To avoid unexpected results, View::setDynamicLightingOptions() now
clamps the parameters between the camera's near and far plane.
2025-08-29 14:46:14 -07:00
Mathias Agopian
88fa99d782 The Record buffer is now dynamically sized.
The record buffer is were we store the light indices, its maximum
size is 65536 entries, but is often limited to 16384 on about 30%
of Android devices because of the 16KB UBO limit.

This PR makes the record buffer use up to 64K entries when allowed
but the h/w.

The record buffer can be a limiting factor when many lights are used
with many froxels. With the minimum of 4096 froxels and a 16KB record 
buffer we get an average of 4 lights per froxel. With our maximum of
8192 froxels and a 64KB record buffer we get 8 lights in average per
froxel.
2025-08-29 14:46:14 -07:00
Mathias Agopian
b57fb8cc13 Missing includes and small cleanups 2025-08-29 14:46:14 -07:00
Mathias Agopian
9f3c0ec8ef Update all per-object/instance buffers all at once
FIXES=[433807402]
2025-08-29 14:45:36 -07:00
Mathias Agopian
6d0a47b37c add concept of offset to instancebuffer offset 2025-08-29 14:45:36 -07:00
Mathias Agopian
39bf0f0a71 move FScene::updateUBO() back to FView
it really didn't belong to FScene
2025-08-29 14:45:36 -07:00
Filament Bot
a7894b5876 [automated] Updating /docs due to commit 44ed67b
Full commit hash is 44ed67bfb6

DOCS_ALLOW_DIRECT_EDITS
2025-08-29 21:22:42 +00:00
Powei Feng
44ed67bfb6 docs add performance analysis page 2025-08-29 14:19:28 -07:00
Andy Hovingh
1765f1421d additional performance analysis documentation, namely on locking GPU frequency 2025-08-29 14:26:44 -05:00
Juan Caldas
4a4c4b276f Remove temp gltf sample (#9166) 2025-08-29 18:50:26 +00:00
FireBanana
8c985607b8 Remove extra tab in PassNode 2025-08-29 11:04:13 -07:00
Juan Caldas
090941c35a webgpu: Remove temporary file (#9165) 2025-08-29 18:00:41 +00:00
Andy Hovingh
7e6d6f6635 webgpu: fix linux build with added unit tests 2025-08-29 12:39:35 -05:00
Juan Caldas
a695170193 Add missing attributes to sample (#9160) 2025-08-29 12:52:12 +00:00
rafadevai
eed71107c9 GL: Fix memory leak for external texture with non external sampler (#9159)
In EGLAndroid, external textures imported from an AHB
that dont use a SAMPLER_EXTERNAL are not properly destroyed,
causing a memory leak that eventually leads to an OOM.
2025-08-29 01:30:27 +00:00
Juan Caldas
74ba3eb00c webgpu: Support skinning on WebGPU (#9137)
BUGS = [436886048]
2025-08-29 00:24:14 +00:00
Powei Feng
088900e6e0 Fix bones indices and weights sampler + descriptor set (#9154)
In some places, this sampler was incorrectly assumed to be
sampler2darray, but it should be just a sampler2d.  Additionally,
sampling from it should produce unfiltered values - this has been
changed accordingly.
2025-08-28 14:05:16 -07:00
Syed Idris Shah
60ab596e39 wgpu: fix the deadlock in finish call for gltf_viewer
gltf_viewer on android calls finish before creating any resources.
This causes a hang on OnSubmittedWorkDone for the work that was never
there. Put a check in Driver::finish call to avoid the deadlock.
2025-08-28 14:42:44 -04:00
Sungun Park
e03b077e9b fix: Make ZstdHelper compatible with UBSan (#9152)
In ZstdHelper::isCompressed call, `src` may not be aligned to 4 bytes,
which is violating the alignment requirement of
`UndefinedBehaviorSanitizer: misaligned-pointer-use`, thereby resuling
in a runtime failure with UBSan enabled. So reconstruct the 32-bit
integer as a workaround.
2025-08-28 18:10:09 +00:00
Juan Caldas
f5418cb866 webgpu: Handle stacked swizzles (#9149)
BUGS = [433944896]

---------

Co-authored-by: Andy Hovingh <6198728+AndyHovingh@users.noreply.github.com>
2025-08-28 17:12:44 +00:00
Syed Idris Shah
9b75b18426 wgpu: Fix linux build
webgpu build on linux was broken because of 45fcea101f.
Resolve the symbols conflict between webgpu and X11.
2025-08-28 12:06:08 -04:00
Powei Feng
8f5f007e83 vk: fix rendertarget uninitialized fields (#9153) 2025-08-27 13:38:47 -07:00
Sungun Park
1aab0585da Disable amortized shader compile by default (#9151)
This is a temporary resolution until we fix an underlying issue.
2025-08-27 12:46:58 -07:00
Andy Hovingh
1d1e15d915 webgpu: profiling and system tracing support 2025-08-27 10:41:14 -05:00
Doris Wu
ff394f7c1b feat: Add Visibility Bitmask method for GTAO (#9101)
* Quick test

* Fix incorrect logic and add some comments

* Set thickness parameter

* refactoring

* Update

* Generated files

* Some comments

* Update

* Update generated files

* Update

* Update

* Add comments
2025-08-26 23:27:02 +00:00
Syed Idris Shah
161b75b9b7 wgpu: Fix samples on linux
Window size should be calculated from windows not screen on XLIB.
XCB window is not implemented in Dawn. Remove the stale/wrong implementation in filament
2025-08-25 16:51:04 -04:00
Powei Feng
bc12a56920 vk: check rebind flow if bindDescriptorSet called between draw2 (#9139)
In the case with external samplers, if another descriptor set gets
bound between draw2(), then we need to check to see if a rebinding
of the pipeline is necessary.

Co-authored-by: Serge Metral <sergemetral@google.com>
2025-08-25 09:04:11 -07:00
Mathias Agopian
15bb295ec6 A new froxel grid vizualization for FilamentApp
FilamentApp now has debugging options to enable or disable the
camera and directional shadow frustums, as well as the new
"froxel grid" visualization.

"froxel grid" is automatically enabled when "froxel debugging" is
enabled in the debug gui in gltf_viewer.


New corresponding debugging APIs were added to View.
2025-08-22 15:55:46 -07:00