21 Commits

Author SHA1 Message Date
csmartdalton
8ac7190472 feat(vk): Avoid a copy for rasterOrdering non-input-attachment passes (#11298) e4ef1ece98
When the renderTarget doesn't support
VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT, we have to use an offscreen color
texture instead. Previously, we would copy this offscreen texture back
into the renderTarget after the render pass, which incurred a
substantial amount of memory bandwidth. This PR instead transfers the
offscreen texture to the renderTarget as part of the render pass, and
then discards the offscreen texture, saving a fullscreen copy on TBDR
architectures.

Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
2025-12-17 22:26:11 +00:00
csmartdalton
69b17fe3a8 fix(ci): Increase tolerance on histogram compare (#11274) 332a226197
lots_of_tess_spans_stroke is seeing a histogram result as low as .95087
on a correct image. Bump the default tolerance to .05 so we don't get
false negatives. Hopefully this holds us over until we can work on more
accurate image diffing.

Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
2025-12-14 03:17:19 +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
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
csmartdalton
483faae4bb refactor(vk): Add a vkutil::Texture2D class (#9862) 5779effa92
vkutil::Texture2D wraps a VkImage AND a VkImageView so we don't have to
manage both of these objects separately when we just want a simple 2D
texture. It also subsumes TextureVulkanImpl, allowing us to simplify
things further and remove that class.

vkutil::Texture & vkutil::TextureView are renamed to vkutil::Image &
vkutil::ImageView, in order to reflect the fact that they are just very
thin wrappers around VkImage & VkImageView.

Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
2025-06-02 04:23:54 +00:00
blakdragan7
954db4fedf feature(Dx12 backend) (#9520) b4a317b254
* path_fiddle d3d12 and start of d3d12 imple

* converted to precompiled hlsl for tess, grad and atlas. Fixed sampler issue in d3d11

* started implementing resource managment

* working state with grad,tess and atlas draws coded. GPUResource mangement also in

* draws in with another set of validation fixes

* atomic mode working

* textures now upload correctly, atomics now have barriers and index/vertex buffers are properly bound

* typo fix

* made work with gms, uniforms updated correctly now, coelesed and resolve now works

* passing golds?

* proper que dependencies

* added some comments around passing command lists for d3d12, if no copy is given, use direct for both

* rename

* added golden pr

* refactor pulling out all shader compiling to a shared D3DPipelineManager class

* pre comments

* fixed workflow syntax error

Co-authored-by: Jonathon Copeland <jcopela4@gmail.com>
2025-04-30 02:54:08 +00:00
csmartdalton
7b52804479 Fix a crash on Galaxy A10 (Mali-G71)
Mali-G71, and apparently some PowerVR devices, both crash when issuing draw commands with an unspecified number of instances. Pick a safe threshold and issue these commands in loops on those devices.

Also check in some improved logging for browserstack gms.

Diffs=
35e26fd9f2 Fix a crash on Galaxy A10 (Mali-G71) (#9079)

Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
2025-02-21 09:41:11 +00:00
mjtalbot
240e1dced2 Fix premake tag
fix builds for editor and tasks

Went with beta3 for anything that looks like apple silicone, seems to have been used in other cases (maybe we want to try beta4 though?)

also we use beta2 a "lot" elsewhere, so stuck to that on linux. but i think we should probably just bump everything to 4

Diffs=
b153a81b61 Fix premake tag (#8865)
8c9dc78dbd Android BrowserStack fixups (#8856)

Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
Co-authored-by: Maxwell Talbot <talbot.maxwell@gmail.com>
2025-01-14 11:40:58 +00:00
csmartdalton
da575e1551 More android tuning for PowerVR
* Rearrange the GLSL in unmultiply() to a configuration that doesn't hang on PowerVR, or cause a compile failure with no message.

* Make sure to always either update or preserve the clip & coverage buffers, even if ENABLE_CLIPPING isn't defined for the current draw.

* Don't use GL_KHR_debug on PowerVR. It can cause shader compiles to take 30+ seconds.

* Support 32-bit android arch in check_golds.sh & deploy_tests.py.

* Reverse histogram sorting order so bad matches come up first.

* Simple bugfixes.

Diffs=
3c322193bf More android tuning for PowerVR (#8747)

Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
2024-12-14 01:48:58 +00:00
blakdragan7
5b6483923d added missing_goldens and missing_candidates to diff.py result
Diffs=
567dd549f1 added missing_goldens and missing_candidates to diff.py result (#8722)

Co-authored-by: Jonathon Copeland <jcopela4@gmail.com>
2024-12-11 01:42:17 +00:00
csmartdalton
ec0d4dae61 diff.py updates
* Fully null-check histogram before using it.
* Add "missing_candidate" and "missing_golden" as status line items.
* Do Browserstack diffing in parallel.

Diffs=
ce070a26e9 diff.py updates (#8721)

Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
2024-12-10 17:46:28 +00:00
blakdragan7
b20c31a3f1 re add clean to diff
re-added clean functionality. Added in fails_only mode that does the same thing cleans does for identical but for passing entries

Diffs=
ca10c9ec63 re add clean to diff (#8697)

Co-authored-by: Jonathon Copeland <jcopela4@gmail.com>
2024-12-06 17:04:59 +00:00
csmartdalton
01dfd88484 Sort by % diff pixels in diff.py when histogram is equal
Diffs=
7414d20597 Sort by % diff pixels in diff.py when histogram is equal (#8683)

Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
2024-12-05 18:51:33 +00:00
blakdragan7
3497147061 made compatable with python 9_9
Diffs=
9dfd01fb3a made compatable with python 9_9 (#8678)

Co-authored-by: Jonathon Copeland <jcopela4@gmail.com>
2024-12-04 02:20:52 +00:00
csmartdalton
fb1cc47540 diff.py: don't count identicals as differences
Diffs=
454bc50aaf diff.py: don't count identicals as differences (#8666)

Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
2024-12-04 00:53:58 +00:00
blakdragan7
e3e0556f64 fixed url for canddiates and goldens in not pack mode
Diffs=
fb8ecf3552 fixed url for canddiates and goldens in not pack mode (#8649)

Co-authored-by: Jonathon Copeland <jcopela4@gmail.com>
2024-11-27 02:25:07 +00:00
blakdragan7
76cc558f74 fixed workflow stuff
fixed packed flag for diff.py

Diffs=
28582ea0fd fixed workflow stuff (#8628)

Co-authored-by: Jonathon Copeland <jcopela4@gmail.com>
2024-11-22 20:57:40 +00:00
blakdragan7
9c8862fb81 updates to diff.py
`diff.py` now outputs a well formated html file. Also, we no longer sort by device. so that errors of all devices are at the top.

Diffs=
b32973afd6 updates to diff.py (#8623)

Co-authored-by: Jonathon Copeland <jcopela4@gmail.com>
2024-11-21 22:31:51 +00:00
blakdragan7
69cb1edeb2 image diff hiistogram mode
* added `-H` flag that uses a new histogram compare mode for checking diffs of images on `diff.py` and `image_diff.py`
* added `NO_VENV` environment variable check for disabling `pyenv` for local development in `diff.py`

Diffs=
807f9b20ac image diff hiistogram mode (#8601)

Co-authored-by: Jonathon Copeland <jcopela4@gmail.com>
2024-11-20 16:32:40 +00:00
blakdragan7
293ab0e82d imagediff -> opencv
Removed need for imagediff and skia, now using imageDiff.py and opencv / numpy

This removes the need to build skia for check_golds. However, it does add a dependency on opencv so pip is once again needed. It's only needed for testing though, so it should be much more manageable.

To get around this we can build python-opencv ourselves following the manual build instructions [here](https://pypi.org/project/opencv-python/). However, that would be quite a large build time, and I don't think it's quite necessary.

Diffs=
a02ac789ca imagediff -> opencv (#8397)

Co-authored-by: Jonathon Copeland <jcopela4@gmail.com>
2024-10-26 02:57:39 +00:00
rivessamr
5207dd8ba2 Opensource (tools) tests as part of runtime
- Most of tools/* have been moved to the new packages/runtime/tests. (Excludes fuzz and a few things with proprietary information)

- The tools/test are now in packages/runtime/unit_tests/renderer.

- The runtime/tests are now also moved, to the following packages/runtime/unit_tests/runtime (moved the "dev/tests" to packages/runtime/unit_tests)

- Thus unit_tests comprises of runtime and renderer tests (in the future we can add more categories as folder, this avoids too many tests in one folder)

- The rendering tests and runtime tests are built together in one executable called unit_tests*. This is what is described in the rive-runtime README - it is the way our developers can test the rendering (GPU) and runtime (CPU) unit tests in one go.

- pr_runtime_tests now builds and runs all the unit_tests, previously it was only executing the runtime tests, but now it includes the renderer tests for the (same platforms still tested: windows, windows msvc, mac, linux)

- The pr_tools_tests still tests the same workloads on the same devices, limited still to the rendering tests

ISSUES:

- We cannot build all the "tools" tests (e.g. imagediff, rendering tests) with the runtime tests. The runtime tests enables TESTING. I'm also not sure if running the runtime tests on all the devices is actually is worth it - if the tests are platform+device agnostic then probably not worth it.

- Windows pr_runtime_tests switched to ws-actions/configure-aws-credentials@v1 from microsoft/setup-msbuild@v1.1, as would not build otherwise, seems related to old version of premake

TODO:

- Verify of the performance is reasonable for runner / checkins

Diffs=
f25ee97a0 Opensource (tools) tests as part of runtime (#8035)

Co-authored-by: rivessamr <suki@rive.app>
2024-09-03 22:45:48 +00:00