-
-
Notifications
You must be signed in to change notification settings - Fork 952
render: Handle uploading to Bc3RgbaUnorm and Rgba16Float textures #22700
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
render: Handle uploading to Bc3RgbaUnorm and Rgba16Float textures #22700
Conversation
|
Oopsie, forgot to run tests with --all-features, looks like sometimes the data can already be pre-compressed sometimes. |
aa2e7aa to
985bd00
Compare
| 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, |
There was a problem hiding this comment.
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>?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
| num_frames = 1 | ||
|
|
||
| [image_comparisons.output] | ||
| # Higher tolerance due to BC3 compression artifacts |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point.
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.