2639 Commits

Author SHA1 Message Date
philter
a2258ce4b9 chore: Runtime Scripting fixes & tests (#11094) 539bd8c48c
- 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>
2025-11-20 00:59:45 +00:00
luigi-rosso
bf4098ccac feature: autocomplete requires! (#11090) 6bd796b5f0
* feature: autocomplete requires!

* chore: cleanup

Co-authored-by: Luigi Rosso <luigi-rosso@users.noreply.github.com>
2025-11-19 23:26:07 +00:00
csmartdalton
59013181f9 fix(vk): Never read the resolve attachment (#11081) 2430b66647
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>
2025-11-19 22:03:19 +00:00
bodymovin
fd96a4c11e chore(scripting): rename scripting (#11084) 85b425bf93
* 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>
2025-11-19 21:35:23 +00:00
avivian
99235b63b2 Peon Worker Script Signing (#11063) 8748f53562
* feature: signing and compiling via ffi

* feature: script signing

* fix ups

* Fix tests

Co-authored-by: Arthur Vivian <arthur@rive.app>
Co-authored-by: Luigi Rosso <luigi.rosso@gmail.com>
2025-11-19 14:38:56 +00:00
luigi-rosso
6d943f51ed feature: Script signing (#11016) 9295f20b82
* feature: signing and compiling via ffi

* feature: script signing

* fix: missed with rive scripting

* chore: more fixes

* fix: rive_native wasm

* fix: missed dispose call for the workspace

* feature: optional signing

* chore: core collision

* feature: doing actual verification

* fix: signature verification at runtime

* chore: missed files

* fix: switch order

* fix: with rive scripting flag

* fix: core def collisions

* chore: unifying enrich assets

* chore: remove unnecessary type check

* fix: signing context

Co-authored-by: Luigi Rosso <luigi-rosso@users.noreply.github.com>
2025-11-18 23:55:24 +00:00
csmartdalton
d908c5da4f fix(vk): Use rasterOrdering mode on Imagination GPUs (#11072) 69b2a3c643
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>
2025-11-18 23:28:42 +00:00
philter
121dd6de5a fix(editor): Prevent runtime script advance when state machine not playing (#11062) 81f6b8ffa7
Co-authored-by: Philip Chung <philterdesign@gmail.com>
2025-11-18 05:22:50 +00:00
luigi-rosso
a5779b15f6 chore: rev to latest luau release 700 (rive_0_23) (#11060) 2ac436db1b
* chore: rev to latest luau release 700 (rive_0_23)

* fix: api changes

Co-authored-by: Luigi Rosso <luigi-rosso@users.noreply.github.com>
2025-11-17 23:00:19 +00:00
philter
74bdfa7697 chore: ScriptedDataConverter in runtime (#11053) 05e1b4ab9f
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>
2025-11-17 18:30:48 +00:00
bodymovin
68c68d2a03 feature: add ScriptedContext (#11052) 1d2c69015a
* feature: add ScriptedContext

Co-authored-by: hernan <hernan@rive.app>
2025-11-17 03:13:00 +00:00
bodymovin
06c84e3653 chore: cache advancing components and support any core object as adva… (#11039) a9e670e153
chore: cache advancing components and support any core object as advanceable

Co-authored-by: hernan <hernan@rive.app>
2025-11-15 20:02:49 +00:00
philter
f73857b3b4 chore: Scripted PointerEvents at runtime (#11046) 7507e62b37
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>
2025-11-15 19:46:00 +00:00
luigi-rosso
caefe3dfe3 feature: add contour measure to scripted path! (#11049) b63286db94
* feature: add contour measure to scripted path!

* fix: failing tests

Co-authored-by: Luigi Rosso <luigi-rosso@users.noreply.github.com>
2025-11-15 17:24:32 +00:00
bodymovin
d182adede2 fix: only delete invalid objects when an artboard is destroyed (#11048) c85665930c
Co-authored-by: hernan <hernan@rive.app>
2025-11-15 03:06:10 +00:00
philter
d03977e753 chore: Perform Script's method validation only once (#11037) c783bb438c
Co-authored-by: Philip Chung <philterdesign@gmail.com>
2025-11-14 01:27:28 +00:00
bodymovin
33544ab137 fix: advance current state by 0 when there is no previous state (#10994) f1fb606c21
* 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>
2025-11-14 01:05:08 +00:00
philter
f672e1c565 Scripted Layouts C++ Runtime (#10907) 6f471b7939
Co-authored-by: Philip Chung <philterdesign@gmail.com>
2025-11-13 21:20:26 +00:00
csmartdalton
b222969ac8 fix(webgpu): Various fixups (#11023) 4ecb920d73
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>
2025-11-13 20:52:30 +00:00
philter
d0d17afc00 chore: Implement ScriptedObjectImporter to import ScriptInputs (#11002) 08647852bf
Co-authored-by: Philip Chung <philterdesign@gmail.com>
2025-11-12 20:11:07 +00:00
blakdragan7
d96bdc9836 fix(dx12) intel and Intel arc support (#11022) 21cbb65eef
* 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>
2025-11-12 02:28:37 +00:00
luigi-rosso
547b32616d chore: rev to luau 0.699 (#11019) 1bb021d018
Co-authored-by: Luigi Rosso <luigi-rosso@users.noreply.github.com>
2025-11-11 14:44:47 +00:00
JoshJRive
94e19bd96a Fix Vulkan bootstrapping API version reporting (#11001) f5191dd154
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>
2025-11-10 22:22:25 +00:00
JoshJRive
ba00cfa23f Update our signal handler to break into the Windows debugger if it's attached (#11015) d9b3ed9801
Update our signal handler to break into the debugger if it's attached on Windows

Co-authored-by: Josh Jersild <joshua@rive.app>
2025-11-10 21:02:17 +00:00
csmartdalton
a43b67a3f3 fix(wasm): Remove ASAN from the default WASM debug build (#10995) 0743b80014
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>
2025-11-07 17:00:52 +00:00
csmartdalton
d977ef90dc feat: Implement clockwise mode on GL_EXT_shader_pixel_local_storage2 (#10987) 5f018f395b
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>
2025-11-06 17:39:35 +00:00
bodymovin
f94df89893 chore: improve collapsed data bind processing performance (#10962) ed5a446ff2
Co-authored-by: hernan <hernan@rive.app>
2025-11-06 12:18:32 +00:00
philter
3d195c35fd fix(runtime): Revert state machine checks for needsAdvance (#10985) 3b82e09da9
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>
2025-11-06 02:19:48 +00:00
JoshJRive
883e0c8094 Report missing gms in overnight/manual GM Tests (#10988) 5615843df1
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>
2025-11-06 01:56:09 +00:00
blakdragan7
5c7474c384 fix(renderer): d3d12 AMD / Intel support / raster order support (#10983) c47562209d
* 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>
2025-11-05 23:28:55 +00:00
csmartdalton
defee8ff44 Bump to latest wagyu port (build 69) (#10977) d0b67890c8
Bump to latest wagyu port (build 69) to get access to wgpuWagyuStringArrayFreeMembers

Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
Co-authored-by: Sam Magnuson <smagnuso@gmail.com>
2025-11-05 21:20:56 +00:00
csmartdalton
b90846fb66 feat(vk): Support faster texture updates (#10978) 0049d6e21e
Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
2025-11-05 17:21:10 +00:00
luigi-rosso
4dd14ab6ad fix: crash when multiple definitions have the same name (#10976) 43585faefe
Co-authored-by: Luigi Rosso <luigi-rosso@users.noreply.github.com>
2025-11-05 02:41:57 +00:00
JoshJRive
dbe049473c Improvements to Browserstack golden/gm runs (#10967) d2f21b08aa
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>
2025-11-04 22:24:29 +00:00
bodymovin
ee71941573 chore(scripting): add support for creating pointer events in scripts (#10968) 2daf848d0a
Co-authored-by: hernan <hernan@rive.app>
2025-11-04 21:00:40 +00:00
blakdragan7
d69c0290f1 fix(unreal): Several fixes for unreal (#10963) 5a321f1807
* 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>
2025-11-03 22:56:58 +00:00
blakdragan7
381eb27b7c refactor(renderer): move gamma correction logic to atomic resolve. (#10966) b9471b7d2a
* 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>
2025-11-03 21:30:15 +00:00
luigi-rosso
bd4d7d421f feature: rev to latest luau (#10960) ac8e6c591e
Co-authored-by: Luigi Rosso <luigi-rosso@users.noreply.github.com>
2025-11-03 13:03:52 +00:00
luigi-rosso
2cfdfeb13f feature: add to path (#10961) 1607b4d220
Co-authored-by: Luigi Rosso <luigi-rosso@users.noreply.github.com>
2025-11-02 23:03:13 +00:00
bodymovin
33487b2caf feature(scripting): expose pointer events (#10958) d571f01f6e
Co-authored-by: hernan <hernan@rive.app>
2025-11-01 19:34:34 +00:00
blakdragan7
5de82fb44d feat(unreal): basic rhi msaa support (#10926) a2fcd46df8
* 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>
2025-10-31 23:58:31 +00:00
bodymovin
4e29fadc0a chore: add utf8 library for scripting (#10956) 097cdb71c3
Co-authored-by: hernan <hernan@rive.app>
2025-10-31 23:07:29 +00:00
bodymovin
4c9b4e1215 fix: treat conditions as unmet if the state machine is not bound (#10955) 5c6dfc4b7a
Co-authored-by: hernan <hernan@rive.app>
2025-10-31 22:50:30 +00:00
csmartdalton
2a9d79e199 feat: Implement clockwise mode using the interlock in Vulkan (#10951) 9903c18b2e
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>
2025-10-31 21:24:47 +00:00
luigi-rosso
01a615a41a fix: require order causing a crash (#10953) fd749cce47
feature: add word joiners support (#10908) 937778bd8d

Co-authored-by: Luigi Rosso <luigi-rosso@users.noreply.github.com>
Co-authored-by: hernan <hernan@rive.app>
2025-10-31 19:24:35 +00:00
bodymovin
88596e1e99 feature: add support for quantization and speed controls on nested artboards (#10839) 96e8debf43
feature: add support for quantization and speed controls on state machines

Co-authored-by: hernan <hernan@rive.app>
2025-10-31 18:35:53 +00:00
luigi-rosso
e225f224e4 feature: add scripted nodes! (#10949) 6a61e45ac0
Co-authored-by: Luigi Rosso <luigi-rosso@users.noreply.github.com>
2025-10-31 05:31:33 +00:00
luigi-rosso
0130018219 fix: no crash if bindableProperty is nullptr (#10944) 45400d8398
Co-authored-by: Luigi Rosso <luigi-rosso@users.noreply.github.com>
2025-10-30 22:11:25 +00:00
bodymovin
972141d736 chore: add more scripted converter features (#10939) 5f3da40291
Co-authored-by: hernan <hernan@rive.app>
2025-10-30 21:24:08 +00:00
csmartdalton
153e8fb2b5 fix: fp16 precision issue in clockwise rendering (#10940) 1a7500295d
We were using an epsilon that became 0 in fp16. Bump it to a nonzero,
non-denormalized fp16 value.

Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
2025-10-30 18:17:16 +00:00