Commit Graph

7387 Commits

Author SHA1 Message Date
Juan Caldas
a07c19e5b7 Add missing WebGPU checks (#9037)
part of BUGS = [424157731]
2025-08-06 16:18:18 -04:00
Filament Bot
59f4d1ba20 [automated] Updating /docs due to commit ac076e8
Full commit hash is ac076e872e

DOCS_ALLOW_DIRECT_EDITS
2025-08-06 06:03:06 +00:00
Powei Feng
ac076e872e Release Filament 1.63.0 2025-08-05 22:59:34 -07:00
Matthew Hoffman
9e55331801 Backend tests using webgpu (#8823)
BUGS = [424157731]
2025-08-06 00:19:13 +00:00
Powei Feng
f70a11ced4 Feature flag guard compat check of material instance and desc-set (#9035)
This will allow clients more time to correct their code.
2025-08-05 16:34:53 -07:00
Andy Hovingh
455545f024 wgpu: fix ssao bent normals 2025-08-05 16:35:25 -05:00
Andy Hovingh
f35ec42125 bilateral blur & shadow map materials require unfilterable samplers
This fixes the Display Shader Texture with the WebGPU implementation.
2025-08-05 16:05:07 -05:00
Powei Feng
4242bc43fd utils: add precond/postcond macro guarded by feature flags
We link the behavior of certain precondition/postcondition checks to feature flag states.

- If provided *flag* is true, then this macro will assert when the *condition* is false.
- If provided *flag* is fase, then this macro will output a warning when the condition is false.
- If the condition is true, then neither of the above will happen

These two macros will enable us to provide less restrictive behavior for certain correctness assertions, allowing clients to modify their before enabling these assertions by default.
2025-08-05 20:48:13 +00:00
Mathias Agopian
bbe6d35bf2 fix typo in gtao material 2025-08-05 12:59:24 -07:00
Andy Hovingh
c8894521c8 webgpu: add visibility for debugging bind groups via logging (compile-time flag option) 2025-08-05 12:42:40 -05:00
Ben Doherty
a2475b5dcb Use default descriptor set for shared material variants (#9025) 2025-08-04 10:27:05 -07:00
Andy Hovingh
b7b89168a7 webgpu: support depth in blit + copy when we can. 2025-08-04 10:02:09 -05:00
Powei Feng
79551eacb2 Update MATERIAL_VERSION to 63 2025-08-03 22:56:09 -07:00
Powei Feng
e181c74b6c Fix matp test typo 2025-08-01 16:27:35 -07:00
Powei Feng
418704dbb1 Test matp instead matc 2025-08-01 16:25:41 -07:00
Yein Jo
eeb4fe219b Restore test files and moved to matp 2025-08-01 15:57:23 -07:00
Yein Jo
7d227630fc fix max line 2025-08-01 15:57:23 -07:00
Yein Jo
d84e42861c Fix includes 2025-08-01 15:57:23 -07:00
Yein Jo
3a75dc6d2d Move some classes to private 2025-08-01 15:57:23 -07:00
Yein Jo
66b67849af Extract material parse logic to filament-matp 2025-08-01 15:57:23 -07:00
Powei Feng
ba5900efcf webgpu: descriptor set unbind on null handle 2025-08-01 14:42:58 -07:00
Powei Feng
2d518b5fd1 ppm: ensure a renderable descriptor set is bound
- We set a dummy set at the renderable bind point for
   post-processing passes, since it is not used.
2025-08-01 14:42:58 -07:00
Mathias Agopian
ee8d0e6ebf remove fake dependencies on the PER_VIEW UBO
The PER_VIEW UBO was updated by different render passes at different
times, which created synchronizations on the GPU, between unrelated
passes and prevented the vertex shader to run on parallel with another
pass for instance.

In the PR, we fix this by moving ALL the UBO set-up outside of 
render passes. It's now done early, just before creating the framegraph.

The PER_VIEW UBO is shared between several passes, themselves using
different descriptor sets; so we need to make sure all the data
necessary for these passes is computed and set in the UBO (e.g. SSR
passes).

The passes themselves (like the color pass) still set the textures and
UBOs in their descriptor sets, but then no longer updated the content
of the UBO itself.

In this PR we also remove some "fake" dependencies between passes due
to descriptor sets straddling between passes. This is done by unbinding
all descriptor sets at the end of each pass. The PER_MATERIAL descriptor
set is a bit special because it should be unbound between full screen
quads draws.

Additionally, there some places in the code attempting to update
UBOs only when the content was dirty were missing a "clean" call, to
reset the dirty bit to the unset state.

The main change here is to move the code that set the UBO content out
of the ColorPassDescriptorSet (and a few other) into View and instead of
updating the content in the color pass (and a few other), do that at
the beginning of Renderer::render().
2025-08-01 14:01:17 -07:00
Mathias Agopian
b4c9b9f489 renderStandaloneView() needs a driver and engine flush 2025-07-31 12:10:23 -07:00
Mathias Agopian
e59972b41f unbind descriptor-sets after renderpasses
this prevents a false dependency with the next pass and keeps us
honest about what resources we're using.
2025-07-31 12:10:06 -07:00
Powei Feng
5fb9fad3ce vk: fix broken iblprefilter path (#9019)
The issue is that we need to reset the bound info in
VulkanDescriptorSetCache when the current command buffer completes
recording.
2025-07-31 10:45:34 -07:00
Filament Bot
44bbab158b [automated] Updating /docs due to commit bbced6d
Full commit hash is bbced6d59d

DOCS_ALLOW_DIRECT_EDITS
2025-07-31 17:31:35 +00:00
Benjamin Doherty
bbced6d59d Release Filament 1.62.2 2025-07-31 10:27:23 -07:00
Doris Wu
433fded025 Workaround the skybox issue on webgl build (#8974) (BUGS=419664914)
* duplicate the material instance in webgl

* Use default instance

* Update comments

* Update

* Address the comments

* Update the naming
2025-07-31 01:56:07 +00:00
Sungun Park
86d19e53ea gl: Cleanup code flow in ShaderCompilerService (#9014) 2025-07-31 01:02:24 +00:00
Mathias Agopian
70d41664b5 Add Renderer::shouldRenderFrame() API
FIXES=[410463814]
2025-07-30 15:32:23 -07:00
Juan Caldas
08c783e05f Pass extent for non headless 2025-07-30 13:03:33 -05:00
Ben Doherty
ce5c6e3aec Fix incorrect buffer size and memory free issue with prefilter mipmap (#9009) 2025-07-30 10:31:41 -07:00
Juan Caldas
2e6ac18d03 webgpu: support blit 2025-07-30 11:52:35 -05:00
Powei Feng
4b4dd3b70e ppm: add fixed material instance references (#9008)
In the introduction of MaterialInstanceManager, the assumption is
that everytime PostprocessManager wants an instance, we can just
provide a "new" one since all of the instance's content - UBOS,
textures - will not be shared between passes.  But this is not
the right assumption. For `colorGradingPrepareSubpass` and
`customResolvePrepareSubpass`, they are filling in an instance
for later passes to use.

To address this, we add a way to identify a fixed instance in
MaterialInstanceManager. This will allow us to refer to specific
instances of a material across passes (for the duration of a
frame).

This address the following crashes:
 - Enabling custom resolve for MSAA for the metal backend
 - Resizing the gltf_viewer window

Also move the dof instance into the loop to prevent UBO reuse.

Remove instance dependencies in Gaussian Blur Pass (separable).
2025-07-30 05:02:30 +00:00
Mathias Agopian
0976542d67 remove the explicit command queue flushes
Filament used to issue command queue flushes (E.g. glFlush()) after
large passes like the color pass in order to kick the gpu into action
sooner and reduce latency.  This however comes at a high cost on the
gpu timeline as command queue flushes are expensive on vulkan and 
metal. Moreover GL drivers are allowed to ignore glFlush().

So we just remove all these calls.
2025-07-29 16:35:22 -07:00
Sungun Park
b51e7f8b50 gl: Expedite shader cancellation in THREAD_POOL mode (#9002)
Previously, cancelling shader compilation tokens in THREAD_POOL mode
would block the engine thread until GL resource loading completed. This
led to unexpected application stalls when numerous shaders were
simultaneously cancelled.

This change moves the token cancellation logic to the compiler thread.
By marking tokens for asynchronous cancellation, we prevent unwanted
main thread stalls, ensuring a smoother user experience during bulk
shader cancellation.

BUGS=[430068776]
2025-07-29 21:38:23 +00:00
Powei Feng
b0e2f3a91a ppm: remove incorrectly checked in files 2025-07-29 13:04:25 -07:00
Ben Doherty
c25ac68a3a Better set default shader stages for samplers (#8992) 2025-07-29 10:01:36 -07:00
Powei Feng
0f572f797d utils: add method for index of first set bit in bitset (#9006) 2025-07-28 19:58:40 +00:00
Powei Feng
8600295ba4 webgpu: flush before reading pixels (#9003)
- Implement finish() to block until GPU work is done.
 - Implement flush() has the old finish() logic
 - Add flush() before reading pixels
2025-07-28 17:44:23 +00:00
Powei Feng
e4aeca28ec matdbg: update monaco dep (#8997)
- Update the monaco editor to the latest available version
   (0.52.2)
- Disable formatting for webgpu since it's already formatted
2025-07-26 00:07:47 +00:00
Filament Bot
f14ff6606a [automated] Updating /docs due to commit 5628b8b
Full commit hash is 5628b8b6e7

DOCS_ALLOW_DIRECT_EDITS
2025-07-25 23:31:26 +00:00
Powei Feng
5628b8b6e7 docs: add framegraph to notes (#8987) 2025-07-25 23:28:22 +00:00
Filament Bot
c7b919a065 [automated] Updating /docs due to commit 45e74c2
Full commit hash is 45e74c279f

DOCS_ALLOW_DIRECT_EDITS
2025-07-25 23:10:16 +00:00
Powei Feng
45e74c279f docs: add material properties page (#8980)
This is to replace the original "Material Properties.pdf".
2025-07-25 23:07:40 +00:00
Powei Feng
26b68d9654 PPM: add material instance caching (#8988)
We add a class to manage a cache of material instances mapped by
materials. This allows us to re-use instances across frames. Note
hat also it's possible for the same frame to want to use the same
instance multiple times (for example for bilateral blurring or
upsampling), but we allocate separate instances for that case so
that UBOs are not shared across render passes. This allows for
bubble-reduction for vulkan (and possibly other backends).
2025-07-25 22:47:50 +00:00
Powei Feng
8e8f6ad8a4 Update remote UI 2025-07-25 15:27:33 -07:00
Mathias Agopian
9b4ddb9353 update remote UI 2025-07-25 15:24:08 -07:00
Mathias Agopian
d7ef6665cc a hybrid instancing sample 2025-07-25 15:03:12 -07:00