Commit Graph

6868 Commits

Author SHA1 Message Date
Doris Wu
57f6214637 Some cleanups (#8558)
* Clean up includes

* Fix the logic
2025-03-24 09:19:37 -07:00
Doris Wu
26171e7f76 Remove trailing whitespace (#8556) 2025-03-24 09:19:31 -07:00
Benjamin Doherty
472054631a Bump version to 1.58.2 2025-03-19 16:17:23 -07:00
Benjamin Doherty
6066e3a461 Release Filament 1.58.1 2025-03-19 16:17:13 -07:00
rafadevai
ea0bbad636 vk: Refactor Vulkan android into its own class (#8538) 2025-03-19 20:41:44 +00:00
Eliza Velasquez
65861b85cf 1dlut: fix psychadelic lookup tables 2025-03-19 12:15:35 -07:00
Eliza Velasquez
1f169d7e75 1dlut: fix iOS build 2025-03-19 12:15:35 -07:00
Eliza Velasquez
daa359717b 1dlut: mathias feedback 2025-03-19 12:15:35 -07:00
Eliza Velasquez
4fbfd1b8c1 Generate 1D LUTs for color grading when possible
This introduces two new methods to `ToneMapper`: `isOneDimensional()` and
`isLDR()`. `ColorGrading` references these values along with other parameters
passed to the builder to determine if we can get away with only generating a
one-dimensional LUT. Meanwhile, `PostProcessManager` takes care of setting the
new spec constants and uniforms for `colorGrading.mat` and
`colorGradingAsSubpass.mat`.
2025-03-19 12:15:35 -07:00
Syed Idris Shah
67f05c15d0 Fix WebGPU compilation error
WebGPU is broken because of 3abddc4584 change
2025-03-19 13:25:09 -04:00
Doris Wu
4db3cc521b Move includes outside fgviewer namespace (#8543) 2025-03-19 13:42:34 +08:00
alizahlalani
9e6cf3c876 Refactored external image handling in PlatformEGLAndroid (#8512) 2025-03-18 23:46:31 +00:00
Powei Feng
b64548267e vk: disable transient texture for depth resolve (#8534)
Depth resolve is handled via a custom shader and therefore cannot
use the transient texture path.

This is fixes the black screen bug when MSAA is turned on and
when using the latest MoltenVK (1.2.11).
2025-03-18 17:51:59 +00:00
Randy Reyes
5c811844ff webgpu: fix spacing 2025-03-18 10:25:10 -07:00
Randy Reyes
e6b18b4560 webgpu: enable unpacking WGSL code in filamat 2025-03-18 10:25:10 -07:00
Powei Feng
1571ea846b vk: minor swizzle code clean-up (#8535) 2025-03-18 17:09:55 +00:00
Matthew Hoffman
78c6456fbe Update gtest to 1.16 (#8528) 2025-03-17 16:31:48 -05:00
bridgewaterrobbie
84cce8cfdf Run dead code elimination for WGSL even if all other optimizations are disabled 2025-03-17 15:16:19 -04:00
bridgewaterrobbie
49b7c7169f Avoid building point size demo and material if WebGPU is enabled. 2025-03-17 15:16:19 -04:00
Powei Feng
dbfe2dbc5e Disable renderdiff for breakage (#8500)
Disable renderdiff for breakage
2025-03-17 11:47:19 -07:00
Serge Metral
0ec60de287 vk: External sampler platform code (#8500)
Adds enums for enabling external sampler / immutable samplers. No actual implementation yet.
2025-03-17 09:51:34 -07:00
rafadevai
7eb756ca96 vk: Fix Vulkan Validation errors when importing an AHB (#8509)
- Make sure we setup a valid sample count of 1.
https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-VkImageCreateInfo-samples-parameter
- Select a proper memory type based on the list
provided by the `metadata.memoryTypeBits`
https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-VkMemoryAllocateInfo-memoryTypeIndex-02385
2025-03-16 01:56:42 +00:00
Mathias Agopian
3abddc4584 APIs to query the texture limit sizes.
Assert textures dimensions are in range when creating a Texture object.

FIXES=[398901038]
2025-03-15 16:32:29 -07:00
bridgewaterrobbie
35661a1974 Add appropriate matc flags for WebGPU when enabled
Currently WebGPU does not support skinning nor stereo, so they also must be disabled if targeting WebGPU.
2025-03-14 13:17:23 -04:00
bridgewaterrobbie
606a1259f6 Avoid generating subpass code if using WebGPU
Subpasses should not be used anyways due to the result of WebGPUDriver::isFrameBufferFetchSupported. However, we need to make sure the GLSL is not generated for WebGPU, or Tint is unable to convert.
2025-03-14 13:17:23 -04:00
Powei Feng
6479a5bc12 github: change wgsl presubmit to use linux (#8525) 2025-03-14 16:59:11 +00:00
Andy Hovingh
c95f9ed7e0 WebGPU: backend components created and conditionally logged
Initial groundwork in creating WebGPU backend components, namely
the instance, adapter, device, and queue.
If configured to do so, the backend will print out details about
these components.
The samples/hellotriangle.cpp was slightly modified to include a
webgpu option which allows for exercising the above, but does not
yet draw anything to the screen/window.
NOTE: This has only been sanity tested with hello triangle
on Mac OS and the Android emulator at this time, NOT IOS,
Windows, or Linux yet.
2025-03-13 19:45:48 -05:00
Powei Feng
e3b7861aa2 webgpu: combine tint static libs into single lib (#8520) 2025-03-13 17:57:25 +00:00
Powei Feng
84980d89af Add .clang-format to project root (#8487) 2025-03-12 22:19:01 +00:00
Powei Feng
60640be5e8 vk: fix generateMipmaps level (#8495)
The level counting was off by one.

FIXES=400710879
2025-03-12 21:47:52 +00:00
Powei Feng
5f730ac173 osmesa: allow static linking of osmesa (#8486)
- Add path for static linking
- Fix get_mesa script.
2025-03-12 21:00:22 +00:00
Powei Feng
e12ed900d0 webgpu: fix filamat android build (#8514)
Also fix a change in backend API.
2025-03-12 19:05:28 +00:00
Doris Wu
78487f4836 [fgviewer] Collapse subresources by default in web view (#8517)
* Collapse subresources by default

* Fix typo
2025-03-12 14:58:54 +00:00
bridgewaterrobbie
25e9802fd5 Add validate wgsl pipleine test 2025-03-11 17:40:21 -04:00
bridgewaterrobbie
dacd03ce42 Adjust running the test to fail on 0 tests. This is to ensure we don't pass the test due to the webgpu build failing or similar 2025-03-11 17:40:21 -04:00
bridgewaterrobbie
c9cfc63df0 Add tests to convert sample shaders with Tint to WGSL 2025-03-11 17:40:21 -04:00
Juan David Caldas
9c69cb8484 Enable WebGPU option for matc and add WGSL options for shader generation 2025-03-11 17:40:21 -04:00
Matthew Hoffman
8ea4cb50d2 Add helpers for backend tests. (#8505)
Both for cleaning up graphics resources at the end of a test and for starting/stopping render loops.

BUGS=[402472882]
2025-03-11 14:25:32 -05:00
Mathias Agopian
4f8080ead2 Fix material instance check log when destroying material
When the feature flags assert_destroy_material_before_material_instance
is disabled, we emit a log instead of an assert. Unfortunately this log
would be emitted even when all material instances were destroyed.
2025-03-11 11:09:11 -07:00
rafadevai
34ebe45e2a vk: External Texture implementation for Vulkan (#8488)
Add support for the new createTextureExternalImage2R
API instead of createTextureExternalImageR.

Add the support to import AHardwareBuffer objects
into Vulkan in Android.
2025-03-11 06:01:28 +00:00
Sungun Park
bb3e3df2f4 Fix release notes 2025-03-10 22:35:35 +00:00
Sungun Park
0bcb45613e Release Filament 1.58.0 2025-03-10 22:11:59 +00:00
Powei Feng
0a0d4ed23a Update HandleAllocator in test (#8508) 2025-03-10 12:49:58 -07:00
Ajmal Kunnummal
b9a39bc066 Add a way to pass a transform matrix along with Stream::setAcquiredImage (#8496)
BUGS=[399959254]
---------

Co-authored-by: Syed Idris Shah <idrisshah@google.com>
Co-authored-by: Haneul Kim <haneulk730@gmail.com>
Co-authored-by: Powei Feng <powei@google.com>
Co-authored-by: Doris Wu <doriswu@google.com>
Co-authored-by: Mathias Agopian <mathias@google.com>
2025-03-10 09:58:58 -07:00
Powei Feng
e825f43935 matdbg: indicate shader model (#8504)
Shader model (desktop or mobile) wasn't really accounted for
in the UI. This means that we will get shaders that look like
duplicates (same variant). In this work, we pass the current
shader model from engine into the frontend and filter out
variants of a different shader model.

Moreover, for matinfo, we use a specific dbg shader model (matinfo)
to indicate it is in that mode. We add UI in matinfo to show the
shadermodel.

So UI updates as well.
2025-03-07 23:54:22 +00:00
alizahlalani
ee68872a47 Add ahb mapping util functions to map ahb usage and format to TextureUsage and TextureFormat (#8491) 2025-03-07 22:28:56 +00:00
Konstantin Sakhin
2f4e48b6b9 Texture: prevent SIGILL in sampler validator. (#8468)
Co-authored-by: Romain Guy <romainguy@curious-creature.com>
2025-03-07 12:11:04 -08:00
Powei Feng
5091b3112d matdbg: fix variant issue for surface materials (#8503)
- The set of active variants were not set correctly for surface
   materials since the frag/vert pairs could have different
   variant.
 - Fix the default selection logic in the UI
 - Random clean-ups

FIXES=328699979
2025-03-07 17:46:04 +00:00
Ajmal Kunnummal
7199961248 Update the associated uniforms every frame for materials with attached Streams (#8493)
BUGS=[399959254]
2025-03-07 01:05:44 +00:00
bridgewaterrobbie
d0a00803c1 Restore workaround for CONFIG_MAX_INSTANCES and CONFIG_FROXEL_BUFFER_HEIGHT not being a spec constant, because WGSL does not support that being an array length (#8479) 2025-03-07 00:28:36 +00:00