9412 Commits

Author SHA1 Message Date
Sungun Park
6be37a92b8 Merge branch 'rc/1.71.2' into release v1.71.2 2026-04-28 21:07:26 -07:00
Eliza Velasquez
be2096d1f4 engine: override spec constants on instance-basis
# Conflicts:
#	filament/src/LocalProgramCache.cpp
#	filament/src/PostProcessManager.cpp
#	filament/src/PostProcessManager.h
#	filament/src/details/Material.cpp
2026-04-24 07:15:40 +08:00
Ben Doherty
cad722cb9a Add missing output precision to custom surface output (#9923) 2026-04-22 13:21:40 -04:00
Powei Feng
ffeaae8903 Bump version to 1.71.2 2026-04-21 12:19:52 -07:00
Powei Feng
cde3d5a2df Merge branch 'rc/1.71.1' into release v1.71.1 2026-04-21 12:19:51 -07:00
Powei Feng
f82085f676 Release Filament 1.71.1 rc/1.71.2-cut 2026-04-21 12:19:43 -07:00
Filament Bot
695c2f82ea [automated] Updating /docs due to commit c55ee9f
Full commit hash is c55ee9faae

DOCS_ALLOW_DIRECT_EDITS
2026-04-21 18:25:14 +00:00
Powei Feng
c55ee9faae sizeguard: add tag to bypass test (#9743) 2026-04-21 17:58:05 +00:00
Powei Feng
2a561211aa ppm: compile resolveDepth only for vk/metal (#9904)
Sampling from a multi-sampled texture is not allowed for webgpu.
From the comments in the material, we only need this for vk and
metal.
2026-04-20 18:36:25 +00:00
Ben Doherty
06793c4a80 Add support for custom outputs for unlit surface materials (#9912) 2026-04-20 11:47:51 -04:00
Ben Doherty
533294de9a Add support for custom outputs for unlit surface materials (#9912) 2026-04-20 11:46:21 -04:00
Eliza Velasquez
04684411b9 engine: override spec constants on instance-basis
# Conflicts:
#	filament/src/LocalProgramCache.cpp
#	filament/src/PostProcessManager.cpp
#	filament/src/PostProcessManager.h
#	filament/src/details/Material.cpp
2026-04-20 14:34:42 +08:00
Ben Doherty
4787e341d6 Add feature level when outputting raw shaders (#9911) 2026-04-17 13:32:45 -04:00
Powei Feng
afeae22423 android: [render-validation] collection of adjustments (#9898)
- A triangle tracker under the progress bar to track the test
   currently in view within the scroll view.
 - Text label to indicate the current device under test when a
   test is running.
 -  add filter intent arg
 - Add Fox (animation, skinning) and TransmissionRoughnessTest
   (transmission) to the test.
 - Add applyAnimation to the ValidationRunner
 - Make camera zoom in for default test and adjust tolerance
   acoordingly
 - Fix non-determinism of SSR by
     - waiting for more frames
     - account for false returned from beginFrame
     - Clear frame history on new test entry
 - Include Build.HARDWARE information into result
 - Make results array more thread-safe
 - Remove unused paths
 - Adjust tolerance for two tests
2026-04-16 19:28:48 +00:00
Mathias Agopian
a2547731c0 Backend: Centralize fence synchronization and fix potential data races. (#9899)
* Backend: Centralize fence synchronization and fix potential data races.

Transitioned fence synchronization from per-fence condition variables to a
centralized shared condition variable in DriverBase, enabling future global
error propagation and interruption.

Encapsulated synchronization by hiding the mutex and condition
variable within DriverBase and exposing `waitForFence` and `signalFence`.

Fixed a critical bug in Metal backend where spurious wakeups would reset the
relative timeout duration, potentially leading to much longer waits than
intended. Resolved by using absolute time points (wait_until).

Fixed potential data races in Metal, OpenGL, and WebGPU backends by ensuring
that shared state (status or state pointers) is always accessed under the
protection of the mutex, specifically by capturing it inside the predicate.

Simplified Vulkan and WebGPU fences to be purely passive data holders.

Trade-off: Spurious wakeups are increased due to the shared condition variable,
but are handled correctly by mandatory predicates in all backends.

* Update filament/backend/src/metal/MetalHandles.mm

Co-authored-by: Ben Doherty <bendoherty@google.com>

* Update filament/backend/src/metal/MetalHandles.mm

Co-authored-by: Ben Doherty <bendoherty@google.com>

---------

Co-authored-by: Ben Doherty <bendoherty@google.com>
2026-04-16 11:30:41 -07:00
Ben Doherty
b52c25694e Metal: fix potential crash in when dynamic offsets are empty (#9908) 2026-04-16 14:05:32 -04:00
Ben Doherty
bfbb651ecd Metal: fix potential crash in when dynamic offsets are empty (#9908) 2026-04-16 14:05:10 -04:00
Anish Goyal
c041970c76 Make VulkanProgram a ThreadSafeResource (#9788)
With the introduction of cache prewarming, handles for vulkan programs
will be managed on a separate thread in the backend along with the main
backend thread. This requires an atomic refcount to ensure accuracy and
prevent race conditions.
2026-04-16 17:15:53 +00:00
Mathias Agopian
3a78c78e7c gltfio: Continue if floatsCount is 0 in ResourceLoader.cpp
Address feedback from PR #9896 to avoid zero-sized allocations and potential
out-of-bounds reads.
2026-04-16 09:10:08 -07:00
Mathias Agopian
8bfdc60d68 imageio: Fix vulnerabilities in PSDDecoder from PR #9881
- PSDDecoder: Add dimension limits (max 30,000) to prevent integer
  overflows during LinearImage allocation.
- Add checks for stream failure during pixel decoding to handle truncated
  files safely.
- Follow existing pattern in this file by using std::runtime_error for
  these checks, which are caught and handled by resetting the stream and
  returning an empty image.
- Add comment that LinearImage allocation cannot overflow with the new
  limits.
2026-04-16 09:10:08 -07:00
Mathias Agopian
f8f2280ee3 filaflat, image: Fix vulnerabilities from PR #9879 without aborts
- MaterialChunk: Return false in getTextShader when shaderSize is 0 to
  prevent out-of-bounds write of null terminator.
- Ktx1Bundle: In 3-argument constructor, check if total blobs calculation
  overflows uint32_t.
- Instead of aborting with FILAMENT_CHECK_POSTCONDITION, log a warning and
  set the object to a safe empty state (dimensions set to 0).
2026-04-16 09:10:08 -07:00
Mathias Agopian
e6e7c0325e uberz: Fix vulnerabilities in convertOffsetsToPointers without aborts
- Implement fixes inspired by PR #9853 to make convertOffsetsToPointers
  size-aware and prevent OOB reads and writes.
- Change function signature to return bool instead of void, allowing graceful
  error propagation instead of runtime aborts.
- Replace FILAMENT_CHECK_PRECONDITION with explicit checks that log errors
  and return false.
- Update ArchiveCache in gltfio and main in tools/uberz to handle failure.
- Add unit tests to verify rejection of invalid offsets.
2026-04-16 09:10:08 -07:00
Mathias Agopian
8d16ad8882 gltfio: Fix vulnerabilities in ResourceLoader.cpp
- Implement PR #9878 to add bounds checking in normalizeSkinningWeights,
  preventing heap OOB write by clamping the count to available buffer size.
- Fix 3 similar vulnerabilities in uploadBuffers where accessor->count was
  trusted for malloc allocation before cgltf_accessor_unpack_floats.
- Add overflow checks for allocation sizes in uploadBuffers.
- Clamp accessor count based on available buffer bytes in uploadBuffers to
  prevent OOB read.
2026-04-16 09:10:08 -07:00
Mathias Agopian
a943b57c86 ktxreader: Fix vulnerabilities and memory leaks in Ktx2Reader.cpp
- Implement PR #9842 to fix integer overflows in transcodeImageLevel.
- Fix potential division by zero in transcodeImageLevel if bytesPerPix is 0.
- Fix memory leaks in transcodeImageLevel by freeing allocated buffers on
  failure.
- Fix memory leak in Ktx2Reader::load by deleting PixelBufferDescriptor after
  use.
2026-04-16 09:10:08 -07:00
Mathias Agopian
ffa2886493 gltfio: Fix security and memory corruption issues in Utility.cpp
- Fix potential division by zero in decodeMeshoptCompression when stride is 0.
- Fix ignored errors in release builds for meshopt decoding by returning bool
  and checking the result in ResourceLoader.cpp.
- Fix potential integer underflow in computeBindingSize when count is 0 by
  returning 0.
- Update ResourceLoader.cpp to skip buffer upload when computeBindingSize
  returns 0, preventing potential OOM or OOB reads.
2026-04-16 09:10:08 -07:00
Mathias Agopian
415ba57272 Correctly filter out ESSL1 variants
This fixes a recent breakage of the SSR variant while reducing the
size of featureLevel 0 materials.
2026-04-16 09:08:44 -07:00
Ben Doherty
d6369f1007 Bump macOS minimum supported version to 11.0 (#9902) 2026-04-15 16:17:25 -07:00
Filament Bot
0203291b6a [automated] Updating /docs due to commit e85c021
Full commit hash is e85c021dec

DOCS_ALLOW_DIRECT_EDITS
2026-04-15 16:45:49 +00:00
Mathias Agopian
e85c021dec remove the now unneeded FL0 materials
Filament needed to compile FL0 materials for both FL0 and FL1, but this
is now done automatically when a material is a FL0 material.
2026-04-15 09:20:26 -07:00
Mathias Agopian
eb3d592d18 expose EntityManager::getIndex() publicly
This can be needed for interactions with an outside entity system.
Use with caution.
2026-04-15 09:19:00 -07:00
Powei Feng
3b5776a232 vk: improve readpixels (#9883)
- Account for multi-sampling in readback
- Add more types for Conversion::getComponentType()
2026-04-14 05:28:00 +00:00
Filament Bot
afb0b39903 [automated] Updating /docs due to commit 562b66c
Full commit hash is 562b66c715

DOCS_ALLOW_DIRECT_EDITS
2026-04-14 04:46:10 +00:00
Powei Feng
54f3490414 Fix ssao precision issue around silhouettes
In the ssao pass, for silhouette pixels,

```
highp vec3 v = p - origin;
```

can be a "long" vector where the length cannot be captured with
mediump on mobile. This means that

```
float vv = dot(v, v);
float vn = dot(v, normal);
```
and other variables can overflow. This caused the silhouettes to
be dark when ssao is turned on a PowerVR gpu.

The fix is use highp for the relevant variables.
2026-04-13 21:43:48 -07:00
Kai
e0b2133333 Fix direct lighting computation 2026-04-13 21:43:13 -07:00
Kai
9887eab8c0 update clearcoat ibl doc 2026-04-13 21:43:13 -07:00
Mathias Agopian
b85d9af9f9 FL0 materials are always compile via spirv-cross 2026-04-13 21:22:56 -07:00
Sungun Park
562b66c715 doc: Clarify MSVC support for windows
See issue #9894 for more context
2026-04-13 21:18:25 -07:00
Mathias Agopian
8ec732dadc FL0 materials are always compile via spirv-cross 2026-04-13 20:53:35 -07:00
Filament Bot
62ac2950c9 [automated] Updating /docs due to commit defba15
Full commit hash is defba15173

DOCS_ALLOW_DIRECT_EDITS
2026-04-13 21:27:53 +00:00
StreetwareGames
defba15173 update the cached image too 2026-04-13 13:58:32 -07:00
StreetwareGames
4b4074450a fix milkyway image url 2026-04-13 13:58:32 -07:00
Mathias Agopian
84dc1b1c43 Add custom color grading LUT support and test UI in gltf_viewer.
Implemented the custom 3D LUT feature in the ColorGrading API, allowing
users to specify a custom LUT for final color mapping.

To test this feature, added a "Custom LUT" option to the color grading
settings in the gltf_viewer sample. This includes several procedurally
generated LUTs for testing purposes:
- Negative
- Grayscale
- Sepia
- Teal and Orange

Updated settings serialization (Settings.cpp) and the viewer UI
(ViewerGui.cpp) to support these options.

FIXES=[362596936]
2026-04-13 13:40:23 -07:00
Jocelin Cailloux
115c2cf8fe Add missing #include <cstring> and <optional> (#9887) 2026-04-10 18:54:05 +00:00
Powei Feng
5fed291284 3p: add models Fox and TransmissionRoughnessTest (#9889) 2026-04-10 05:10:33 +00:00
Powei Feng
7212317a3b android: [render-validation] UI update and enhanced tolerance definition (#9876)
- Update default_test.json with targeted test variants and documented
  tolerance presets.
- Refactor test suite to cover distinct code paths while maintaining
  multi-backend compatibility (OpenGL/Vulkan).
- Integrate TestProgressBar and UI summary text for better test progress
  visualization.
- Enhance validation managers with dynamic naming, zip extraction/export,
  and bundle creation.
- Update validation_app.py terminal UI to support multiple devices,
  device switching, and local result serving.
2026-04-09 15:39:20 -07:00
Ben Doherty
5f878667a8 Fix null texture pointer crash in GLDescriptorSet (#9884) 2026-04-08 13:01:10 -07:00
Ben Doherty
e8ae717c28 Fix null texture pointer crash in GLDescriptorSet (#9884) 2026-04-08 13:00:41 -07:00
Filament Bot
b6cb8096e6 [automated] Updating /docs due to commit be32398
Full commit hash is be3239810a

DOCS_ALLOW_DIRECT_EDITS
2026-04-08 02:09:32 +00:00
Benjamin Doherty
7ec4faa324 Bump version to 1.71.1 2026-04-07 18:41:43 -07:00
Benjamin Doherty
ff33f8bd0e Merge branch 'rc/1.71.0' into release v1.71.0 2026-04-07 18:41:42 -07:00