- Call reinit on ScriptedObjects in Artboard::initialize as discussed. We still need to reinit in Artboard::internalDataContext, because things like ScriptInputViewModelProperty depends on the ScriptedObject having a datacontext, which we don't necessarily have at initialize time.
- Always run the setup code in ScriptedObject::scriptInit, but only run the init function if we verified its implementation.
- Added some tests. Still need to add more comprehensive tests once we can get rivs exporting with bytecode.
Co-authored-by: Philip Chung <philterdesign@gmail.com>
When Vulkan expands the renderTarget into the MSAA color buffer for
LoadAction::preserveRenderTarget, we've been reading the resolve texture
as an input attachment. But it's debatable whether a texture can be an
input attachment AND a resolve attachment in the same render pass, and
some early Qualcomm devices have struggled with this even if we
implement the MSAA resolve manually. For now, always copy out the render
target to a separate texture when there's a preserve.
Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
* chore(scripting): make init and draw optional
* chore(scripting): rename ScriptType to ScriptProtocol and none to utility
* rename Drawing to Node
Co-authored-by: hernan <hernan@rive.app>
We already have a codepath that enables rasterOrdering on ARM, even
if the extension isn't present, because we know that's how these GPUs
work. If we enable this codepath on Imagination, it appears to work as
well. This works around an MSAA crash on Pixel 10.
feat(wgpu): Add core support for MSAA (#11040) cb9968caef
Implement an MSAA mode in WebGPU that doesn't rely on any optional
(non-core) features besides SPIR-V. This will be the catch-all fallback
that works everywhere.
Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
Co-authored-by: blakdragan7 <jcopela4@gmail.com>
ScriptedDataConverters in C++ runtime. Adds a new DataType.any which allows a datavalue to be applied as long as the propertyKey type matches the datavalue's type.
Co-authored-by: Philip Chung <philterdesign@gmail.com>
This PR refactors some of the StateMachine related code (listener groups) and adds support for pointer events to ScriptedDrawables.
Co-authored-by: Philip Chung <philterdesign@gmail.com>
* fix: advance current state by 0 when there is no previous state
* fix memory leak
Co-authored-by: Phil Chung <philterdesign@gmail.com>
Co-authored-by: hernan <hernan@rive.app>
Fix a couple shader flags in WebGPU (including some refactoring to
handle them at the RenderContext level instead of the backends).
Fix renderTarget{Width,Height} in TestingWindowWGPU.
Add a "--gms" option to check_golds.sh so we can skip goldens in local
runs and make them faster.
Add a "-r" option to check_golds.sh for release runs.
Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
* fixed intel arc
* dont use raster ordering with intel arc
* better comment
* pulled out intel checks as requested on PR
Co-authored-by: Jonathon Copeland <jcopela4@gmail.com>
The version that was being passed to the rive vulkan context was the version from querying the instance, which can differ from the API version that the actual device supports. This now correctly passes the device's vulkan version, which eliminates the need for a weird workaround in the VMA initialization (where we thought we had a Vulkan 1.3 device but in fact it was only Vulkan 1.0).
Additionally mark the VKDBGUTILWARN003 message that happens on the S23s as non-aborting. It appears to be an incorrect warning - "Renderpass is not qualified for multipass due to a given subpass", for a renderpass that is not set up as multipass.
Co-authored-by: Josh Jersild <joshua@rive.app>
This was causing our wasm debug binaries to become so large that some
browsers couldn't handle them anymore. If we need ASAN, we have a proper
"--with-asan" option for that now.
Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
Clockwise mode finally gives us a really good use case for
EXT_shader_pixel_local_storage2. On scenes that don't use advanced
blend, this is showing speedups around 1.35x.
This PR also does some cleanup around consolidating the logic for
ShaderMiscFlags::fixedFunctionColorOutput, so we don't have to
re-implement the same logic in every backend.
Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
Reverted an update where nested artboards were checking their nested state machine instances for needsAdvance and advancing if true. This appeared to fix (#10842) an issue that required a double advance when running goldens, however, there is actually another issue that this masked rather than fixing it. That will come in a seperate PR.
Co-authored-by: Philip Chung <philterdesign@gmail.com>
Now when Rive Slack Bot posts to the golden channel when a gm run (both gl and vulkan), it will also report the missing results (and missing goldens, should that be a thing) if there are any.
Co-authored-by: Josh Jersild <joshua@rive.app>
* proper states based one warnings. Support for gpunamefilter
* fix for raster order mode
* now works on AMD
* factored out wstring conversion
* clang format
* no need for pop back if using len -1
* removed uneeded forward declare
Co-authored-by: Jonathon Copeland <jcopela4@gmail.com>
A few quality-of-life improvements to the way the Browserstack runs (and image diffing) work and look.
- Add a Device Summary to the generated diff page that shows the list of devices and how many tests passed/failed/were missing for each (with failures sorted to the top). This makes it easier when things are failing a lot (like currently in Vulkan) to more easily where the failures are
- Fix an error when running the Browserstack script on Windows
- Add the Android OS version to the device name (there are multiple of the same device make/model on Browerstack running on different OS versions, and we were squishing their results together into one pile)
- Simplify the device name for devices with a redundant model name (i.e. Google_Pixel_6 instead of Google_Pixel_6_Pixel_6)
- Set a display name on browser stack (mostly so that the browserstack dashboard will stop showing a warning that some tests don't have names), but the display name contains the backend name (or default if it was unspecified) so browsing between gl and vulkan runs is easier
- Unified color definitions (and changed a couple to be easier to read, especially in the device summary page)
- Fixed how some of the text was being injected into the template to not contain a bunch of (conveniently invisible) \ns (that is, the actual text \n was in the document, not as newlines)
- Diff page no longer shows the "pass" and "identical" sections if it's in fails_only mode
Co-authored-by: Josh Jersild <joshua@rive.app>
* added setter methods for properties
* made lists a reference. unsettle artboard in a bunch of places that needed it.
* made lists references. Removed field notify value from lists.
* added context menu entry for cleaning generated classes
* started implementing clean function
* added clean context menu entry for cleaning up duplicate blueprint types
* attempting to make list manipulation more stable
* re arranged how view models work
* rebase error
* now properly removes handle even if objects goes out of scope
* uneeded header and clang format
* more uneeded header
* missing check
* added unit test for getHandleForInstance
* addresed pr comments
* pr comments
* missing semi colon
* clang-format
Co-authored-by: Jonathon Copeland <jcopela4@gmail.com>
* updated unreal msaa shaders to use new includes
* moved gamma convert to be at end instead of begining
Co-authored-by: Jonathon Copeland <jcopela4@gmail.com>
* Started adding msaa mode to rhi
* initial state msaa working on d3d12
* Now set stencil ref via set pipeline state
* set stencil in correct location
* vulkan msaa working for non advanced blend in rhi
* fixed missing check for msaa
* proper merge msaa and fix advanced blend for atomics
* added COALESCED_PLS_RESOLVE_AND_TRANSFER permutation and added better shader compile exclusions
* Now uses coalesce resolve
* base msaa working in d3d12 rhi
* mac support for non advanced blend msaa
* finally wokring on both dx12 and vulkan
* seperated out splitting render passes by a platform feature flag
* better name
* merge master
* some odd typo
* better matrix compare
* better comment
* glsl syntax fix
* removed commented code
* removed is matrix function in favor of all() as per PR comment
* factored out modify shader as a subcless
* updated cvar variable
* fix typo
* followed PR comments
* more pr comments
* clip planes actually do work now
* removed FixedFunctionColorOutput variable in favor of the flush desc member var
* fixed type restrictions and clang format
* improved comment and added missed file from last commit
* revert factoring common code because it was causing several errors
* factored out common shader code
* check clip plane support
* changed back to vulkan only
Co-authored-by: Jonathon Copeland <jcopela4@gmail.com>
Pretty straight-forward implementation.
On Intel this is showing speedups in the 1.2-1.6x range (over atomic
mode, and depending on content).
Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>