Commit Graph

14 Commits

Author SHA1 Message Date
aliasbinman
decf2d683d Add microprofile support (#11403) c83919a247
* Initial commit

* Update macros

* Add GPU Markers

* Fix builds without microprofile

* minor updates

* clang format

* Update profiler.cpp

* clang format

* Name Main Thread

* Update profiler_macros.h

* Fix end flip

* Update fiddle_context_gl.cpp

* clang format

* Update rive_build_config.lua

* Update rive_build_config.lua

* forked microprofile so I can use a tag

* Update render_context_d3d_impl.cpp

* clang

Co-authored-by: John White <aliasbinman@gmail.com>
2026-01-16 18:31:42 +00:00
csmartdalton
e87c811c38 feat: Initial implementation of a clockwise rendering mode (#10897) 2fb75868b5
Add a new InterlockMode that overwrites all fill rules as clockwise and
implements the clockwise path rendering algorithm using raster ordered
PLS. The only backend to support this so far is GL with shader images,
but more will come.

Notably, when there is no advanced blend, we can set
"fixedFunctionColorOutput" and render directly to the target
framebuffer.

Performance so far looks promising, especially on Intel, but more
in-depth perf optimizations arebyet to come.

This is implemented as its own InterlockMode only to give it soak time.
Once this rendering mode is stable, we can merge it back into
"rasterOrdering" and just select draw shaders based on fill rule.

Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
2025-10-24 17:42:24 +00:00
csmartdalton
6efab9c56f feat: Update goldens and player to deploy in the browser (#10453) 827077b899
Set up http and websocket servers in deploy_tests.py that allow us to
communicate with the remote wasm app similarly to how we communicate
with android & ios devices. Add a "-w" target to check_golds.sh that
kicks tests off in the default browser.

Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
2025-08-27 02:58:49 +00:00
JoshJRive
4e0836dbf9 Add background draw shader loading to GL, D3D11, and D3D12 (#10388) c681049169
This adds AsyncPipelineStateManager to the render code, which handles the background processing of draw shader creation (not, at the moment, other shader types...there's no reason those couldn't be added as well, but this seemed the biggest target).

    If a given shader has not been compiled yet, we will fall back on an ubershader version with all features enabled
        the ubershader version will be compiled synchronously if it does not exist yet
    For the D3Ds, this is done with a background thread that compiles the shaders.
    GL, however, does not seem to play nice with background threading shader creation. But what it does have is the KHR_parallel_shader_compile extension, which basically lets the driver create threads in the background and thread the shader compilation.
        The shader manager, in this case, needs to poll the completion state every time the shader is requested and potentially push the compilation along to the next stage (i.e. once linkProgram has completed, then we can do the rest of our setup)
        If KHR_parallel_shader_compile is not supported (for instance, with WebGL on Firefox) then shader compilation will just happen synchronously (I could not find a clear way to thread the GL shader creation, but I would happily add it as a fallback if there is a way)

This change also updates our GLAD loader to version 2.0.8 (from 0.1.36!), which had some API changes.

Co-authored-by: JoshJRive <joshua@rive.app>
2025-08-22 04:00:47 +00:00
csmartdalton
3d7ce2b533 chore: Simplify testing configs (#10072) b1793e755e
Rather than having an explosion of enums for all the different backend
configs, us very basic backend enums (gl, vulkan, metal, etc.), and
capture all the permutations in the separate BackendParams struct.

Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
2025-06-30 18:29:58 +00:00
csmartdalton
823f1b8835 test: More comprehensive testing for offscreen gms (#10055) 05d64b548f
Rename texture_target_gl* gms to offscreen_render_target*.

Implement offscreen render targets for Vulkan testing.

Add permutations for a "riveRenderable" flag, which disables input
attachment support on vulkan, and will disable UAV support on D3D.

Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
2025-06-27 14:11:13 +00:00
csmartdalton
5192aa33d5 feather v1
Diffs=
7ed60faf76 Vector feathering v1! (#8799)

Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
2025-01-18 00:41:35 +00:00
csmartdalton
163f1beef3 Drop the ColumnLimit to 80 for clang-format
This gives better support for smaller screens and side-by-side windows.

Also standardize the formatting check on GitHub on version 17.

Diffs=
e52e9fff29 Drop the ColumnLimit to 80 for clang-format (#8320)

Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
2024-10-11 19:22:48 +00:00
csmartdalton
f0f097b148 Fix glmsaa on Desktop GL drivers
Only enable the GL_EXT_clip_cull_distance on GL ES.

Also tweak the gms more, sorting the slow tests first for better times.

Diffs=
04f481d40 Fix glmsaa on Desktop GL drivers (#8026)

Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
2024-09-05 03:53:49 +00:00
csmartdalton
7af06f205d Tooling tweaks
* Add support for selecting the GLFW monitor in fullscreen mode.
* Add zoom support to player.
* Fix a deprecated android call in player.
* Don't separate goldens and gms into different directories -- it's faster to just diff them all together, and unnecessary to launch two different browser windows when there are failures.
* Call build_rive.sh directly from deploy_tools.py if msbuild.exe is on the path -- there is a startup lag when using build_rive.bat.
* Tune check_golds.sh for machines with higher numbers of cores.

Diffs=
2bd842b54 Tooling tweaks (#8015)

Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
2024-08-30 23:55:14 +00:00
csmartdalton
1e3954e903 Add a "player" app to the tools
"player" is a tool that draws multiple copies of a .riv fullscreen and reports the FPS. It's (sort of) a simplification and rewrite of path_fiddle. "player" takes advantage of the built-in TestingWindow and TestHarness server so it can be easily deployed remotely. Currently, only android is supported as a remote target.

This PR also overhauls and simplifies the android_tools app to use NativeActivities, and deletes almost all the kotlin code.

https://github.com/user-attachments/assets/ff31cc6b-c7fb-42f0-8159-f7b1d9aad9b6

Diffs=
b172dca87 Add a "player" app to the tools (#8004)

Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
2024-08-30 02:55:42 +00:00
rivessamr
9132fc2357 Rename to remove unneeded pls in variable names
Diffs=
57a94aff0 Rename to remove unneeded pls in variable names (#7992)

Co-authored-by: rivessamr <suki@rive.app>
2024-08-29 19:56:43 +00:00
rivessamr
0d2d40ca8e Change class names to strip PLS
Diffs=
c7bb5eb5a Change class names to strip PLS (#7988)

Co-authored-by: rivessamr <suki@rive.app>
2024-08-28 23:03:04 +00:00
rivessamr
1b24bf9f89 Initial file moves and renames
Diffs=
25d423274 Initial file moves and renames (#7951)

Co-authored-by: rivessamr <suki@rive.app>
2024-08-27 22:26:30 +00:00