We add rvalue version of append/insert/replace so that calling
those on a temporary yields to a temporary.
Also add string literal versions of those so that we can
append/insert/replace a literal without allocation, e.g.:
`CString foo = CString{ bar }.append("baz");`
This will not end-up creating a temporary CString for "baz".
I've been going back and forth on whether we information about the
per-view descriptor set layout should be written in the material
file.
In this change, we remove that dependency. By definition the
"per view" descriptor-set layout should only depend on view parameters
and obviously, all materials must be compatible.
In practice, a material does affect the layout so a reconciliation
needs to happen somewhere. It's easier to maintain to have all this
logic in one place (in Filament) instead of split between material
generation and filament.
All this change really does is to remove the information about the
per-view layout from the material file, and move it to Material in
filament, where it is hardcoded (before it was hardcoded in filamat),
but because both sides needed to match there was shared code.
**Material recompilation needed**
the main aim of this PR is to consolidate how we access the
"per view" descriptor set to a single place.
some validation code is moved into DescriptorSets.cpp, so we get a
more centralized idea of what we do with the descriptors.
also factorize in one place the filtering of sampler list by layouts.
* Export graphviz data to the webview
* Fix some errors
* Fix colors
* Only show toggle when view selected
* Update
* Merge graphviz data into json string
* Mark export_graphviz function as const
* Set SERVE_FROM_SOURCE_TREE to 0
* Remove unnecessary import
* Refactor
* Refactor
* New line when early return
clang optimizes code differently with very likely or unlikely
conditions, so we add a `VERY` version of these macros, and we
make use of it for assertions.
- PR #8641 introduced a requirement for including Systrace.h that
wasn't covered by the header-check test.
- Make sure temp.cpp contains only one include
- Add a missing include for Package.h
Perfetto has significantly less overhead. The User facing API is
mostly unchanged:
Here are the differences:
- SYSTRACE_ENABLE() does nothing on ANDROID, initializes systraces on darwin.
- SYSTRACE_DISABLE() is removed.
- A new "gltfio" tag is added.
- SYSTRACE_TAG *must* be defined before including `utils/Systrace.h`
- `utils/Systrace.h` should not be used from a public header
- the new SYSTRACE_TAG_DISABLE disables systrace at compile time
For android a data source MUST be created in the perfetto config:
```
data_sources {
config {
name: "track_event"
track_event_config {
enabled_categories: ["filament", "jobsystem", "gltfio"]
disabled_categories: "*"
}
}
}
```
This can for example be added to AGI's custom/advanced config.
FIXES=[407572663]
Attach MetalLayer to Native View same as vulkan and metal backend.
This change assumes native window is already a CAMetalLayer. This is no different
for IOS and Mac.
* Materials can now specify a shadow strength factor
Materials have a new property: shadowStrength that can be used to
attenuate all shadows received by this material. e.g.:
```
void material(inout MaterialInputs material) {
prepareMaterial(material);
material. shadowStrength = 0.1;
}
```
FIXES=[391663042]
Co-authored-by: Powei Feng <powei@google.com>
---------
Co-authored-by: Powei Feng <powei@google.com>
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.