- only MapAsync the staging buffers that are not being used by any command anymore (the commands have finished executing on GPU)
- additionally, in WebGPUQueueManager, create a blank new submission state when a new command encoder is generated instead of in submit()
BUGS=450620535
When the frame history's circular queue is full and the oldest
frame is not yet ready to be processed, we must skip the current
frame.
This change ensures that if `beginFrame` is skipped, the
corresponding `endFrame` is also skipped. This prevents data
corruption in the frame history.
Address potential issues in FrameInfoImpl and FrameInfoManager:
- Modify FrameInfoManager::beginFrame to handle cases where the
circular queue is full and the oldest frame is not yet ready,
logging a warning and skipping the frame.
This prevents potential use-after-free or data corruption by
ensuring only ready frames are removed from the history.
FIXES=[466081317]
PlatformEGLAndroid holds onto the current swapchain in order to use
it when beginFrame is called. Usually the swapchain is set just before
beginFrame is called. However, that's not the case for standalone
views. These are independent of the swapchain and doing "swapchain
stuff" for them is nonsensical.
So make sure that:
1. PlatfromEGLAndroid doesn't hold onto a dangling pointer when the
swapchain is destroyed. And add proper null checks.
2. Don't do the "swapchain stuff" when beginFrame is called in the
context of a standalone view.
We now reserve frameID 0 for that purpose (meaning the frameid is
non sensical for these).
We're currently relying on frameID to not wrap-around. At 120 fps,
that's about 1 year. This will be addressed in a later PR.
FIXES=[462827028, 461399487]
filament_test_material should not need to depend on a "fixed"
(or checked in) material.
Now the dependent .filamat is generated as needed as is
packaged with the checked-in test_material.filamat as before.
also
- update the android build script to pull the version from
build/common/versions
- remove the ability to specify your own ndk version (this was
undocumented and not fully implemented)
The NDK version now needs to appear in two place (unfortunately):
1. build/common/versions
2. build/android/build.sh
`-mcpu` is intended to target a specific CPU instruction set and
optimization. That's not what we want to do here. What we want is
target an architecture, specifically armv8-a. So we use `-march`
instead. On 64 bits builds, we tune for cortex-a78, which is the
df the Pixel7 era. This doesn't mater much, but might give a little
boost on newer CPU cores. The idea here is that we care "less" about
older CPUs.
- Make sure that renderdiff fails when either building or
rendering fails (the previous problem was in the use of &&
that masked the non-zero exit).
- Make sure that golden branch is properly parsed in
postsubmit.yml
- Disable vk loader debug by default
This change fixes an intermittent crash caused by a thread race
condition.
The crash happened when a CallbackHandler::Callback (triggered by
engine.flush()) attempted to create an instance of a Structure of Arrays
(SoA) like TransformManager, which adds items to SoA) at the same time
that the garbage collection job (FEngine::gc, which removes items from
SoA) was running.
This conflict is resolved by modifying the logic to ensure that the
garbage collection task completes synchronously before the callback
operations begin.
* Adding the begin frame message for later xtrace post processing.
* First commit
* This is not needed
* Bypass the AHB* issue.
* Typo: Forgot to remove the function.
* Typo: No const specifier.
* Removing the const.
* no exception
* Feedback from discussions with Powei.
* Making the changes discussed with the team.
* Removing useless comments.
* Adding the required methods for allocation.
* Forgot one more switch case.
* Moving the resource to fvkmemory::Resource type.
* Adding streamed set.
* Allocating every frame for streamed textures.
* Changing the binding logic.
* Proper checks for the streamed texture.
* Cleanup.
* Chaning the logic of the state tracking for streamed textures.
* Fixed full screen bug.
* Refactoring of the code.
* Typo.
* GitHub feedback.
* Github feedback
* feedback.
* Typo
* Feedback.
* Feedback.
* Feedback
* Feedback
* Feedback
* Fixing the Android path.
* Fixing the Android path.
* Feedback.
* feedback
* Feedback.
* Nit
* Feedback
* Feedback
* Feedback
* vk: fix update after bind (wrt descriptor set) validation error
In filament, once a descriptor set is bound, we no longer make updates
to it. However, this guarrantee was broken in the external sampler/image
because a colorspace change might necessitate a layout change, and
thereby a new descriptor needs to be generated with the appropriate
externally sampled image updated in the new set.
Another use case is the Stream API, where each frame we might be
getting a different AHardwareBuffer, meaning we need to update one
or multiple sampler bindings in a set that might have been bound in
a previous frame.
In this change, we always create a new set when there's a change
in the image currently bound to an existing set (while accounting for
whether we need to use a new externally sampled layout or not).
* Removing the decision on whether to use external format or not out of the streamed texture manager. The issue is that all textures are external, not all are using external format. But it's more robust to let the external format image manager rely on the AHB* to decide if the format is external or not. Regardless (because the memory is external) we need to send this to the external image manager.
* Fixing the validation layer in the Stream CL.
* Typo and comment clarification.
---------
Co-authored-by: Powei Feng <powei@google.com>
Depth testing come with a cost, so when the depth
test is marked to always pass and writting to depth
buffer is disable, just disable the feature.
This will also match the GL backend behavior.