Skip to content

Conversation

@SuchAFuriousDeath
Copy link
Contributor

@SuchAFuriousDeath SuchAFuriousDeath commented Dec 25, 2025

Progresses #14518 and maybe #16081 (can't reproduce, but the assert values and the panic location suggests that this is the same issue).

TLDR:
The asserts for Vector and Bytearray size were wrong. Flash actually allows bigger lengths than what is necessary and for smaller ones, throws Error 2165.

This PR only focuses on inputs, pixelbender outputs also have some issues (which is what #14518 is stuck on after this) but I don't want bloat this PR, there is another one coming.

The FloatPixelData change makes the code more robust imo, using a plain Vec<u8> allowed partial pixels or even partial floats, now that can't happen.

The ByteArray endianness assert should be removed as well, but that will need tests and again, I don't want to bloat this PR.

@kjarosh kjarosh added A-rendering Area: Rendering & Graphics pixelbender T-fix Type: Bug fix (in something that's supposed to work already) labels Dec 25, 2025
@SuchAFuriousDeath
Copy link
Contributor Author

On it 🫡

@SuchAFuriousDeath
Copy link
Contributor Author

This should be ready now.

@kjarosh
Copy link
Member

kjarosh commented Jan 1, 2026

Before merging, can you describe the changes in the first commit message?

@SuchAFuriousDeath
Copy link
Contributor Author

🫡

@kjarosh
Copy link
Member

kjarosh commented Jan 1, 2026

Perfect, thank you!

Fix incorrect size assertions for ByteArray and Vector shader inputs.
Flash allows inputs larger than required (extra data is ignored) and
throws Error 2165 when inputs are too small. The old code panicked on
any size mismatch.

Introduce `FloatPixelData` enum to replace raw `Vec<u8>` for float
texture data. This enforces proper pixel boundaries at the type level,
making it impossible to construct partial pixels or misaligned floats.
@kjarosh kjarosh force-pushed the pixelbender-input branch from 1ec5a79 to 92cafc0 Compare January 1, 2026 19:25
@kjarosh kjarosh enabled auto-merge (rebase) January 1, 2026 19:25
@kjarosh kjarosh merged commit e77ed09 into ruffle-rs:master Jan 1, 2026
26 checks passed
@SuchAFuriousDeath SuchAFuriousDeath deleted the pixelbender-input branch January 1, 2026 19:39
Hancock33 added a commit to Hancock33/batocera.piboy that referenced this pull request Jan 5, 2026
------------------------------------------------------------------------------------------
rocknix-abl.mk 7f8f864b4d14a0529a9ecbf16092a2817d8e2bca # Version: Commits on Jan 02, 2026
------------------------------------------------------------------------------------------
Update README.md,

------------------------------------------------------------------------------------------
dolphin-emu.mk 74c5ca79e2caa986b22d4368dd85398e0b4e09e3 # Version: Commits on Jan 02, 2026
------------------------------------------------------------------------------------------
Merge pull request #14226 from Mrlinkwii/SFML

Externals :update SFML to 3.0.2,

------------------------------------------------------------------------------------------
duckstation.mk d7b2f2d5f76c31f08eb8174f31b40a6d4c563c5e # Version: Commits on Jan 02, 2026
------------------------------------------------------------------------------------------
README: Update minimum macOS version (#3673),

-----------------------------------------------------------------------------------------
supermodel.mk 0d61fa1cf9f7024730be33986bc9f2991465cc5e # Version: Commits on Jan 01, 2026
-----------------------------------------------------------------------------------------
Fix type,

---------------------------------------------------
xemu.mk v0.8.130 # Version: Commits on Jan 02, 2026
---------------------------------------------------
null,

-------------------------------------------------------------------------------------------
moonlight-qt.mk 5f89636ed7227442603e1cf6bfa71f9208d30518 # Version: Commits on Jan 02, 2026
-------------------------------------------------------------------------------------------
Improve robustness of DRM property value handling,

---------------------------------------------------------------
ruffle.mk nightly-2026-01-02 # Version: Commits on Jan 02, 2026
---------------------------------------------------------------
## What's Changed

* avm1: Do not call toString() when coercing string to string by @kjarosh in ruffle-rs/ruffle#22631

* avm1: Fix property declarations of Button by @kjarosh in ruffle-rs/ruffle#22629

* avm1: Clone text fields properly by @kjarosh in ruffle-rs/ruffle#22635

* avm1: Version gate ExternalInterface properties by @kjarosh in ruffle-rs/ruffle#22626

* tests: Fix avm1/global_proto_decls_delete missing some properties by @kjarosh in ruffle-rs/ruffle#22624

* pixelbender: Improve shader argument validation by @SuchAFuriousDeath in ruffle-rs/ruffle#22606

* avm1: Fix XMLSocket dropping data when TCP segments lack null bytes by @SuchAFuriousDeath in ruffle-rs/ruffle#22547

**Full Changelog**: ruffle-rs/ruffle@nightly-2025-12-31...nightly-2026-01-02,

--------------------------------------------------------------------------------------
scummvm.mk 5a1638f7dfa32ff420894aba76622ddcc6ffbdc0 # Version: Commits on Jan 02, 2026
--------------------------------------------------------------------------------------
HUGO: Fix Escape key

Regression from fac22eeccd79f44a82d3e9bbc0a8f6371c1215cc,

---------------------------------------------------------------------------------------
thextech.mk 1f658ea5773673b21aa9b861dc97d1bb99cdc6a6 # Version: Commits on Jan 01, 2026
---------------------------------------------------------------------------------------
Update copyright year for 2026,

---------------------------------------------------------------------------------------
corsixth.mk 880b143357336ae68d2fbb8ec26e01dac5238346 # Version: Commits on Jan 02, 2026
---------------------------------------------------------------------------------------
Merge pull request #3175 from Alberth289346/improve-cpp-variable-initialization

The code changes of #3172 except for the floor render modification.,

----------------------------------------------------------------------------------------
supertux2.mk e464d506ac995be8c603a0f5a62640d3e71ea9ef # Version: Commits on Jan 02, 2026
----------------------------------------------------------------------------------------
Level fixes (#3476)

* test change

* test change

* String typo fixes

* Fix syntax error in script in \Going Underground\

* misc fixes

* fix billboards

* glinted enemies + level tweaks wip

* more glinted enemies + tweaks

* remove bomb puzzles from sl sl

* fixes

* Forest underground WM script updates [ci skip]

* World select coherency for w1 [ci skip]

* World select coherency for w2 [ci skip]

* stuff i forgot to commit lol

* fixes

* Fix weird side crushers in Castle of Nolok

[ci skip]

* bonus island fixes

* more bonus island fixes

* germanpeter

[ci skip]

---------

Co-authored-by: Tobias Markus <tobbi.bugs@googlemail.com>

Co-authored-by: Daniel Ward <39805490+weluvgoatz@users.noreply.github.com>,

----------------------------------------------------------------------------------------
retroarch.mk 68768fcff086d2bc512dab4253ceaf3962f15f37 # Version: Commits on Jan 02, 2026
----------------------------------------------------------------------------------------
UWP: Update x64 Mesa Binaries (#18568),

----------------------------------------------------------------------------------------
doomretro.mk 14b721ba9597f7cd5a5f2e43692fb9fb7742ef4c # Version: Commits on Jan 02, 2026
----------------------------------------------------------------------------------------
Even better mapping of sectors,

------------------------------------------------------------------------------------------
xash3d-fwgs.mk 9ed76fbb365b6fd874125a766dc539f6c0e01c61 # Version: Commits on Dec 30, 2025
------------------------------------------------------------------------------------------
engine: client: allow console toggle from menu via keybind,

--------------------------------------------------------------------------------------------------
libretro-beetle-psx.mk 3770cb4245f8ec65e12f878bf048226f551b6164 # Version: Commits on Jan 02, 2026
--------------------------------------------------------------------------------------------------
Fetch translations & Recreate libretro_core_options_intl.h,

-----------------------------------------------------------------------------------------------------
libretro-mame2003-plus.mk bd5c1e12e36918c236034eb07fe8918c16e7d8b8 # Version: Commits on Jan 01, 2026
-----------------------------------------------------------------------------------------------------
dblewingb,

--------------------------------------------------------------------------------------------
libretro-pcsx.mk e6ae132cbad068afb4e4838af7a1378cc815ed9d # Version: Commits on Jan 02, 2026
--------------------------------------------------------------------------------------------
Merge branch 'master' into libretro,

-----------------------------------------------------------------------------------------------
libretro-scummvm.mk 5a1638f7dfa32ff420894aba76622ddcc6ffbdc0 # Version: Commits on Jan 02, 2026
-----------------------------------------------------------------------------------------------
HUGO: Fix Escape key

Regression from fac22eeccd79f44a82d3e9bbc0a8f6371c1215cc,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-rendering Area: Rendering & Graphics pixelbender T-fix Type: Bug fix (in something that's supposed to work already)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants