This saves a CString copy on the backend side and this forces the
frontend to make a copy explicitly.
In theory the CString should now ever be copied just once.
- Allow for presets to override selected models when presented
in order.
- Add 'gltf' for model search path
- Add a few simple gltf models to the 'base' preset
- Improve UI so that missing tests do not generate any html
bits.
- Add documentation on using the viewer
- Add renderdiff documentation to the project webpage.
RDIFF_BRANCH=pf/renderdiff-enable-webgpu
- The vk readPixels relies heavily on DataReshaper to transform
the output into the client's requested format. We make
additions to the DataReshaper to address previously unavailable
features:
- A copy for half floats - Assuming input and output are
both half floats. We just do memcpy.
- Reshaping with respect to PixelBufferDescriptor's top and
left parameters.
- On the test side, we do a bit of clean-up and add the ability
to export image correctly when the PBD has dimensions different
from the readRect and/or non-zero offsets.
- Also re-enable two LoadImage tests.
Make sure that the rendertarget dimensions matches the texture
dimensions. Update the expected image for the test.
Also fixed usage, rendertarget parameters to make sure vk does
not have any validation errors.
Add a way to show the difference between two rendererd image.
This is a convenience feature to see the differences between
backends.
Refactor the ExpandedFailedResult to use this new view.
We need to have an reference to the default render target for
the duration of the backend lifetime. So even if the client
tries to destroy the default render target, we don't actually
destroy it.
Note that it will be destroyed on driver shutdown.
filament/backend/test/Workarounds.h has a specific workaround
with regards to readPixels and texture usage. Originally this
was introduced for the WebGPU backend. This is needed
for the vulkan backend as well.
Also simplify BufferUpdatesTest.BufferObjectUpdateWithOffset
- no need to call flush() or executeCommands(), these are
called when the test terminates.
- layerCount for a rendertarget should be at least 1.
Users can now create a swapchain with MSAA support, which enables direct
rendering to a multi-sampled swapchain image and automatic resolution.
This is only supported by EGL(Android). Other GL platforms (GLX, WGL,
etc) don't support it because the swapchain MSAA settings must be
configured before window creation.
Support for other backends will follow.
BUGS=[433327615]
Hybrid (InstanceBuffer based) instancing no longer needs a
descriptor-set per object because we now use the same UBO for all
objects, so the "shared" per-object descriptor-set can be used.
This also implies that InstanceBuffer doesn't need to track the UBO
handle anymore, only its offset in the buffer.
VulkanDriver::finish() seems like it is waiting for all the
commands to be processed, but in reality, the present calls
are not waited on (because commands->wait() only waited on
the command buffers).
Here we just call vkQueueWaitIdle to address that case.
This fixes a validation error that occurs when running the
backend test BackendTest.MissingRequiredAttributes.
FSwapChain initialization logic would filter out unsupported flags but
would incorrectly use the original, unfiltered flags when creating the
swap chain.
This commit ensures the filtered flags are passed to the driver. It also
adds the warning to log which ones are removed.
BUGS=[433327615]
blitDEPRECATED can also be used in the context of a multisampled
texture resolve. Fix that case to use the resolve() path in the
VulkanBlitter.
Also fixed backend test BlitTest.ColorResolve to add the correct
usage bit (otherwise it'd have validation error).
FIXES=417229577
* Create exportable fences on Android
Also - create a conversion method for the driver api so that a fence can
be converted to an external handle, where available.
* Create a frontend API for external fences
Fences will be called 'Sync' on the frontend, and come with a method for
conversion to an external sync. This will typically be a file
descriptor, for use in posix systems.
* Refactor Sync to rely on opaque handles
Also - push the callback invocations into the backend, such that they
are scheduled on a worker thread, and not run on the Filament backend
thread.
* Address PR comment - minor refactor
Clear vectors after they've been consumed, and update null checks by
removing explicit reference to nullptr.
* Remove convertSyncToFd from non-android
Other platforms might have other handle types.
Also - remove unused header include
* Add logging for convert to fd
Also, remove duplicate includes
* Address PR - change fd type
As per request by rafadavi@, changed to match the Android spec for file
descriptor type, which is `int`.
* Address PR - remove vtable from sync
Also - rename derived sync classes
* Address comment - make SyncCallbackData private
It's technically implementation-specific, even though it currently
happens to be the same. Separate this into the different backends.
* Add stub for metal backend for sync
* Add stub impl for Sync in WebGPU
We need to modify spirv-tools existing CMakeLists.txt to make
sure that its binaries and libs are not included in the filament
installed output.
This change was present before, but overwritten when spirv-tools
updated (wrt the WebGPU project).
In addition to modifying the CMakeLists.txt, we add a script to
carry out the changes automatically when running the update script
in the future.
Fixes#9168
In the cases of a descriptor set being updated
with a external sampled texture but that descriptor
set doesn't get used later on for rendering.
Their corresponding entry in VulkanExternalImageManager::mSetBindings
will never get removed until the application is terminated, causing
performance issues or a fatal crash if run long enough.
The expectation is that the amount of bindings with
external samplers is low or none, so this won't cause
any regression when not using external samplers.
The backend call `isTextureFormatMipmappable` indicates whether
a format can be used to generate bitmap through graphics API.
(The issue is that previously there was a check to validate
whether a format is mipmappable and levels > 1. These two
conditions do not need to imply one another.)
The workaround option is now set to none by default. Use
```
matc -Wall
```
if you want to restore the previous behavior.
Current material workarounds:
- remove MergeReturnPass (except on Metal)
- remove SimplificationPass (except on Metal)
There are reason to believe these workarounds are no longer needed,
due to changes in spirv-opt.
It's possible that older devices might still need them.
These workaround affect *all* devices, this is why it is important
to disable them if not needed.