This commit clarifies and corrects documentation in several public header
files. The changes include fixing typos, improving wording, and adding
missing details to make the API easier to understand and use.
No functional changes are included in this commit.
Provides logic to load and check for external format ids, and
build fake pipelines against them when relevant, to prevent
hitching when using external formats.
For now, we're going to use upto five likely types of YCbCr
conversions, which seem to cover all usecases encountered. This
means we might compile pipelines with external samplers a total of
4 additional times on top of the baseline (5 in total), or 3 additional
times on the devices we're currently testing (4 in total).
* Add base pipeline prewarm call for ext samplers
This is necessary because in some cases, a material that supports
external samplers will use RGB inputs instead of YCbCr inputs, and will
miss the cache.
* split FeatureFlagManager out of FEngine
- Separate the Feature flags management from FEngine.
- Make FeatureFlagManager available to backends through DriverConfig
- add a way to override a feature flag value at runtime using
environment variables or system properties (on Android).
e.g.:
```
env "feature.name=true" gltf_viewer
```
or
```
adb shell setprop debug.feature.name true
```
Co-authored-by: Powei Feng <powei@google.com>
- Add code for handling empty/null constant name
- Use glUniform1ui() instead of glUniform1i() to workaround
crash on macbook pro (m4).
- Fully specify the constant name in the test (e.g.
`pushConstantsF.red` instead of `red`).
- Make sure that the uniform names are different between
vertex and fragment in the test. This is due to different
constant structs being defined between the two stages.
FIXES=453757504
Prevents hitching for most pipelines, on certain devices with Turnip-based drivers
This does not address external samplers yet. This simply handles the
case where we want to prewarm a pipeline with the base configuration.
Refactor program's descriptor set layout bindings, clean up some leaking
resources
This commit introduces a significant rework of the Temporal Anti-Aliasing (TAA) system, focusing on improving reconstruction quality, robustness, and introducing flexible upscaling.
Core TAA Algorithm improvements:
- Replaced the Catmull-Rom filter with a more efficient 5-tap Lanczos filter for history sampling, which includes deringing to reduce artifacts.
- The input color buffer is now properly "unjittered" using a Lanczos reconstruction filter.
- Improved the history rejection algorithm by skipping the expensive accurate clipping when the history sample is already within the neighborhood's color gamut.
- Added a new `hdr` option to properly handle HDR content by tonemapping colors before blending and untonemapping the result.
- Removed the ineffective `VARIANCE` only history rejection method.
- Added protection against negative numbers in `sqrt()` for increased stability.
TAA Upscaling:
- Replaced the boolean `upscaling` flag with a float factor, allowing for variable upscaling ratios (e.g., 1.5x, 2x).
- Upscaling now correctly adjusts viewport and projection settings.
- The TAA shader now receives viewport and resolution information to correctly handle upscaled rendering.
API and Configuration Changes:
- Deprecated the `filterWidth` TAA option as it no longer has an effect.
- Introduced the `upscaling` float property to `TemporalAntiAliasingOptions`.
- Added the `hdr` boolean property to `TemporalAntiAliasingOptions`.
Other Changes:
- Updated UI elements in the viewer and material sandbox to reflect the new TAA options.
- Updated Javascript bindings and TypeScript definitions for the new TAA settings.
- Refactored shader code for clarity and performance.
makeCurrent is not meant to acquire the swapchain; we should
do so at the momemnt we need it, to shorten the amount of time
a swapchain image/buffer needs to be held.
Since the struct refers to descriptors as opposed to specifically
bindings (although they do contain binding information as well), this
name is more appropriate.
- spectral reconstructions with 4 samples
- unroll the whole dispersion computation to improve performance
(batch texture fetches and reuse common values)
- tool to generate the matrices for spectral integration
This commit simplifies and unifies the FrameGraph's `addPass` API.
Key changes:
- The `addPass` method now uses a single, more flexible implementation
that handles different lambda signatures for both the setup and
execute stages.
- The execute lambda can now optionally omit the `DriverApi&` parameter,
reducing boilerplate for simple passes.
- The `addTrivialSideEffectPass` helper has been removed.
Side-effect-only passes can now be created directly with `addPass`
- Add support for vector parameters (float2, float3, float4) in the
parameters file using `{x, y, z}` syntax.
- Allow comments (`#`, `//`) and empty lines in the parameters file.
- Make the end value optional in the parameters file
(defaults to start value).
- Add `--size` / `-S` option to specify viewport dimensions.
- Optimize rendering by pre-filtering active material parameters.
- Remove hardcoded default parameters and silently ignore missing
parameters to support shared configuration files.
- Add documentation for the parameters file format.
- Split the function so that the 3-components loop is more apparent.
- Factored out the parts of the computation that don't depend on the
index of refraction, so they're only computed once.
- Moved the lod-from-roughness computation out of the loop as well.
It does depend on the IOR, but so little that it's not worth it.
The most important result of this change is that the code is now in
good shape if we wanted to change the implementation of dispersion for
these cases (for e.g.) :
- do the computation in the XYZ space
- use more than 3 wavelengths samples
- or use a stochastic approach, trading banding for noise
RDIFF_BRANCH=ma/better-dispersion
* Update createPipeline to have pipeline key input
Right now, createPipeline in VulkanPipelineCache assumes that you are
building a pipeline using mPipelineRequirements as the key, and that it
should be stored in the cache. In the case of the pipeline prewarming
change, this is not going to be the case; sometimes, the pipeline will
be stored in the cache, and sometimes it will be deleted immediately.
Also, the prewarmed pipelines will be created using separately defined
keys.
* Add knobs for enabling / disabling prewarm
* Add thread pool to VulkanPipelineCache
* Fix dynamic rendering enablement check
Query device features to ensure it is supported / we don't just have the
extension. Also, proactively enable dynamic rendering when creating the
device.
Currently only uniform buffers benefit from the bypass,
but this can also be extended to others buffers too.
This also help trying to match the performance of the
GL backend in Android.
FIXES=[470138463]
Co-authored-by: Serge Metral <sergemetral@google.com>
Api level is now enforced when generating code by appending #defines of client requested and unstable apis.
This ensures that the client can only use unstable apis when they explicitly add `apiLevel` in their .mat file.
FIXES=468340631