* use choreographer to access the system's expected present time
* more Android specific code into VulkanPlatformAndroid
* Fix race-condition between init() and terminate()
it was possible for the thread to not have been ready by the time
we call terminate.
* fix build and minor fixes
* Move resolving #includes from MaterialBuilder to MaterialCompiler, before parsing the material.
- resolving #includes was happening after parsing, now moving before parsing.
this is because we could offload this resolution at build time for RuntimeMaterialCompiler
- filamat::resolveIncludes used to have an assumption where the given text was already
a shader block. this assumption is now broken so it finds the line offset internally.
thus the line offset field is removed from IncludeResult.
* Move include related classes to matc
* adds third_party/libwebp and cmake option to enable building it.
* disable simd and default disable pthreads for webgl builds.
* ensure non-empty config var value
* Added notes on libwebp change to NEW_RELEASE_NOTES.md
* Update NEW_RELEASE_NOTES.md
Before the transformName field was expected to be
used together with the stream API, that is not the
case anymore.
In the scenario that isn't using the stream API,
filament will try to associate the transformName
field to a stream that doesn't exist, causing a
crash.
* Check for null fences to avoid segfault in tests
In some test environments, creating a sync or fence backed by an Android
fence returns null. In order to avoid NPEs, cover this scenario with a
null check.
* Address PR - add log statement
Log that native fences are not supported when unable to create a native
sync fence.
Building tools separately is necessary for the existing
cross-complation usecase. We generalize this by introducing
two cmake vars that enable exporting and importing
prebuilt tools.
The intended usecase is to enable ASAN-built filament without
having to run ASAN-built matc (which is prohibitively slow).
build.sh has been modified to add a `-y` flag forprebuilding
tools.
WebGPU's rendering of bloom sems to be non-deterministic. This
is not expected. For now, we disable bloom+webgpu to avoid
hitting flakes in our CI.
This required a slight refactoring of the test configuration
parsing and execution scripts.
RDIFF_BRANCH=pf/renderdiff-disable-bloom-webgpu
* Use a custom, non-allocating map for frame ids
* use memory_order_relaxed for the id of heap allocated handles
* Added displayPresent time to FrameInfo
To do this, we added support for queryFrameTiming() to the backend,
as a synchronous API. Then FrameInfo uses it to update the
corresponding history entry.
displayPresent time can be used to detect "buffer stuffing", i.e.
when the GPU gets too much ahead of the display. Currently
the information is returned to the user only. Eventually filament will
make use of it to determine if a frame skip is mandated.
* API BREAK: rename frameTime to gpuFrameDuration
* FrameInfo now contains compositor timings
- the presentation deadline
- the refresh rate from the display
- the composition-display latency
* set FrameInfo data to INVALID if feature is not supported
report presentDeadline properly.
The deadlock happened because FrameInfoManager needs to wait that all
fences have signaled before it can be destroyed.
The fix here is simply to destroy the fence without waiting (for safety
we do wait after we destroy them).
This uncovered another problem where all backends didn't handle this
correctly.
We now explicitly handle this when destroying a fence: we make sure it
unblocks all the waiters and returns an error.
on mobile h/w, strong highlights generated by the lighting stages can
turn into +inf and eventually to NaN if more math is performed on them.
Some h/w will kill a while tile or even primitive when that happens,
resulting in strong visual artifacts.
We fix this by clamping to MEDIUMP_FLT_MAX.
* GL: Fix importing non srgb using the external image API
When importing a non srgb AHB but setting the srgb as true,
makes the eglCreateImageKHR function to fail because it tries
to set the colorspace as srgb for non srgb formats.
Example:
createExternalImage(yuv_ahardwaredbuffer, /*sRGB=*/true);
The fix is to only make sure that flag is set to true
if the corresponding filament format requires sRGB and
false otherwise.
* Fix mapToFilamentFormat to return the correct srgb formats
* fix build error on android
---------
Co-authored-by: Serge Metral <sergemetral@google.com>
Fix the callback by using a shared_ptr to store the callback.
The same logic exists in all other backends.
Re-enable corresponding backend test for webgpu.
Remove viewport size check in beingRenderPass. There is no similar
check in other backends.
Fix the callback by using a shared_ptr to store the callback.
The same logic exists in all other backends.
Re-enable corresponding backend test for webgpu.
Remove viewport size check in beingRenderPass. There is no similar
check in other backends.
Previously, Cleanup is scoped to the testing function, which will
go out of scope before BackendTest's destructor is called. We
need to order the cleanup (destruction of resources) to after
the readPixels and previous commands are complete - which is
in the destructor of BackendTest.
Additionally, we need to cleanup before the destruction of the
driver. This means we need to be able to order the destruction
of Cleanup (and not rely on RAII). This is done by having a
unique_ptr holding a Cleanup instance.
* Add Compositor Timing APIs to Platform
These APIs are currently modeled after Android capabilities, but a lot of
the concepts are generic enough to map to other system with a compositor.
This adds Platfrom::queryCompositorTiming() which is currently only
implementd by PlaftormEGLAndroid. Vulkan and WebGPU will come later.
The functionality is implement via EGL, but a new NativeWindow
helper is provided to access the same data from non-EGL backends.
Also to be on the safe side, PlatformEGLAndroid reverts to using
the ANativeWindow if EGL fails.
This CL also cleans-up PlatformEGLAndroid to accomodate those changes.
* Add queryFrameTimestamps() API to Platform.
This API allows to query very precise timing information of
past frames on a given swapchain. This information is provided
by the Android framework via EGL or ANativeWindow (albeit
through private APIs).
Currently only implemented by PlatformEGLAndroid.
SwapChainEGL is now implemented more idiomatically. It has a
constructor that does the initialization. This allows subclasses
to be implemented properly and safely.
PlatformEGL::createSwapChain() now just constructs SwapChainEGL and
does nothing else, which allows a subclass of PlatformEGL to "add" to
the PlatformEGL swapchain, buy simply subclassing from it and
constructing it normally.
The SwapChain doesn't need to have a vtable because polymorphism
is handled by the concrete Platform implementation.
Here we also implement a no-op SwapChainEGLAndroid to show how easy
it is to extend the swapchain. This functionality will be used soon.
- Also modify update script
- Renamed to update_remote_ui
- Repair path inside sciprt
- Ensure update script is not copied over to /docs
- Add requirements.txt (for python/pip dependencies)
- On webgpu, do not error on linux when we're building headless
only (without platform support for surface).
- For test/backend/test.sh, enable path for building on
Linux + 64-bit x86