* added filter type to draw batch
* c++ implementation of ImageSamplerOptions
* image sampler options now pushes correct for RiveRenderPaint
* wip
* OpenGL uses correct sample options
* now only one filter option that accounts for mip map
* d3d now uses sampler states options
* better way to get the filter option
* added mirror and inverse mirror options
* started using helper functions for retreiving sampler optiojnhs
* workaround for vulkn semaphore issue
* wip
* added filter type to draw batch
* c++ implementation of ImageSamplerOptions
* image sampler options now pushes correct for RiveRenderPaint
* wip
* OpenGL uses correct sample options
* now only one filter option that accounts for mip map
* d3d now uses sampler states options
* better way to get the filter option
* added mirror and inverse mirror options
* started using helper functions for retreiving sampler optiojnhs
* workaround for vulkn semaphore issue
* wip
* undo deleting empty descriptor
* properly packed image options
* removed uneeded checks
* more unit tests
* unreal image_filter_options integration, gm for image filters
* properly implement new draw functions for cgrender
* finish mege conflicts
* merge vulkan sampler options
* cherry-picked vulkan imp into branch
* initial metal
* clang-format
* d3d12 image filter options
* fixed d3d
* clang-format
* fixed mip filter for metal
* made every filter option act as similiar as possible
* addressed pr changes
* fixed tests
* empty commit to fix github
* fix: webgl renderers
* started addressing PR comments
* metal change for pr
* more pr stuff
* final PR address
* shader update per PR request
* rhi updat e
* added gm requested in pr
* made d3d12 work with more then 2000 sampler changes per flush
* pr comments
Co-authored-by: Chris Dalton <chris@rive.app>
Co-authored-by: Jonathon Copeland <jcopela4@gmail.com>
Co-authored-by: Luigi Rosso <luigi.rosso@gmail.com>
* add data binding set of tests
library: export used artboards from library files only (#9816) 127097dac4
# Description
Before this PR, we export all artboards from library files in runtime_exporter. This PR makes sure we only include what's directly or indirectly used by the host file.
# Details
While working on the runtime exporter, I'm realizing that we have a lot of arguments on the exportOneFile function that can be simplified, so I changed the api a little there too. I tried to separate out this in the first two commits.
For DataEnums, before this PR, there are 2 sources of 'filter' on what to export. One comes from 'usage', and the other comes from `requiredDataEnums` in the mappingContext. With this PR, I'm consolidating this into just using `requiredDataEnums`, so the usage of the current file is folded into this too.
For ViewModels, it's very similar. Before this PR, there's the argument `viewModels`, and the context view models coming from `requiredViewModels` in the mapping context. I've found this to be a little redundant, so I again folded the former into the latter.
For Artboards, there's already `exportArtboards` in the mapping context, but this represents what's exported by each file. The nested artboards rendering logic uses this directly. We don't have a way to communicate, for every file, what's required by other files. As such, I created a `requiredArtboards` concept, that's similar to the `requiredDataEnums` and the `requiredViewModels` above. This tracks the Artboards that every library file needs to export.
Fixes: https://github.com/rive-app/rive/issues/9434
Co-authored-by: Susan Wang <susan@rive.app>
Co-authored-by: hernan <hernan@rive.app>
# Description
This adds the ability to serialize draw commands to .sriv file via a SerializingFactory which can be used by the unit tests in place of the NoOpFactory.
# Details
You can use the SerializingFactory to initialize your .riv and annotate the serialization with things like frame size and new frame/frame begin. This makes it possible to drop the generated .sriv into the Flutter viewer which will perform the serialized rendering commands to show exactly what the runtime is doing, high level rendering-wise. It can also diff two .sriv files if they are dropped in one drag/drop op.
When adding new "Silver" tests make sure to rebaseline the silvers by doing:
```
cd rive/packages/runtime/tests/unit_tests
./test.sh rebaseline
```
You can now modify the runtime and re-run the tests to make sure the silvers still match:
```
./test.sh
```
The important function to call at the end of your test is ::matches on the SerializingFactory. This will either save or check for equality of the existing silver.
```
TEST_CASE("juice silver", "[file]")
{
SerializingFactory silver;
// .. actually use the factory
CHECK(silver.matches("juice"));
}
```
Diffs=
b329a96f26 Silvers (#9281)
Co-authored-by: Luigi Rosso <luigi-rosso@users.noreply.github.com>