Skip to content

Conversation

@SuchAFuriousDeath
Copy link
Contributor

@SuchAFuriousDeath SuchAFuriousDeath commented Jan 6, 2026

Fixes #22214 (tested)
Fixes #22099 (tested)
Fixes #22552 (tested)
Fixes #21581 (no swf provided, but based on the panic message, probably fixes it as well, although we can't be 100% sure).

The output is taken from Ruffle itself, not by screenshotting Flash. But it seems indistinguishable from Flash and I consider the tests to mainly as assurance that Ruffle does not panic anymore.

@SuchAFuriousDeath
Copy link
Contributor Author

SuchAFuriousDeath commented Jan 6, 2026

Oopsie, forgot to run tests with --all-features, looks like sometimes the data can already be pre-compressed sometimes.

@SuchAFuriousDeath SuchAFuriousDeath force-pushed the texture-upload-compression branch from aa2e7aa to 985bd00 Compare January 6, 2026 10:50
layer: u32,
/// If true, source is raw RGBA8 data that may need format conversion.
/// If false, source is already in the destination format (e.g., pre-compressed).
needs_conversion: bool,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that's non-intuitive and closed for extension.

Have you considered using render's Bitmap<'a>?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't. I'll take a stab at it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You want me to add more formats to to the BitmapFormat enum?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, if we're using other formats it makes sense to add them there and provide conversions

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok that confuses me a little bit. Because there are only 2 options here. Either the data is rgba (and needs conversion), or it's already in the dst texture format. So it doesn't really make sense to me to but a Bitmap<'a> here, that just allows for more options that are impossible to happen.

@kjarosh kjarosh added A-rendering Area: Rendering & Graphics T-fix Type: Bug fix (in something that's supposed to work already) labels Jan 6, 2026
num_frames = 1

[image_comparisons.output]
# Higher tolerance due to BC3 compression artifacts
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Compression artifacts should be present in both FP and Ruffle, so that shouldn't be a reason for increased tolerance. Not saying the tolerance is wrong, but the reason is probably different.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point.

@kjarosh kjarosh added the waiting-on-author Waiting on the PR author to make the requested changes label Jan 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-rendering Area: Rendering & Graphics T-fix Type: Bug fix (in something that's supposed to work already) waiting-on-author Waiting on the PR author to make the requested changes

Projects

None yet

2 participants