Skip to content

Add ImageFormat::Bgra8#120

Merged
sagudev merged 2 commits into
linebender:mainfrom
sagudev:bgra
Aug 29, 2025
Merged

Add ImageFormat::Bgra8#120
sagudev merged 2 commits into
linebender:mainfrom
sagudev:bgra

Conversation

@sagudev

@sagudev sagudev commented Aug 20, 2025

Copy link
Copy Markdown
Contributor

Vello can handle this easily with textureSample which automagically makes it RGBA.
Actually vello uses textureLoad and atlas texture, so we would need to implement this as in vello_cpu, preferably with swaping on image cmd (this should be just bgra vs rgba swizle).

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
@DJMcNab

DJMcNab commented Aug 21, 2025

Copy link
Copy Markdown
Member

I'd like to see a PR properly integrating this in Vello Classic, to make sure it doesn't cause us too much pain.

I think broadly we're in favour of this

@sagudev

sagudev commented Aug 23, 2025

Copy link
Copy Markdown
Contributor Author

I'd like to see a PR properly integrating this in Vello Classic, to make sure it doesn't cause us too much pain.

Done: linebender/vello#1173

@sagudev sagudev mentioned this pull request Aug 23, 2025
@DJMcNab

DJMcNab commented Aug 25, 2025

Copy link
Copy Markdown
Member

We'll probably discuss this in renderer office hours. I can't see why it should be avoided, and the impl in Vello makes sense to me. (Obviously longer-term, the story here will need to change).

This does need a changelog entry. I'm of two minds as to whether we should mark it as a breaking change.

@sagudev

sagudev commented Aug 25, 2025

Copy link
Copy Markdown
Contributor Author

This does need a changelog entry. I'm of two minds as to whether we should mark it as a breaking change.

This is not breaking change because of #[non_exhaustive], but it's intended to ship with rest of breaking changes.

@DJMcNab DJMcNab left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We discussed this in #office hours > 2025-08-28, and have decided that we are able to support this.

This still needs a CHANGELOG entry, but then I'll be happy to approve this.
Thanks!

@sagudev sagudev requested a review from DJMcNab August 29, 2025 15:44
@sagudev sagudev added this pull request to the merge queue Aug 29, 2025
Merged via the queue into linebender:main with commit b271410 Aug 29, 2025
15 checks passed
@sagudev sagudev deleted the bgra branch August 29, 2025 15:50
github-merge-queue Bot pushed a commit that referenced this pull request Aug 29, 2025
Similar as in #120, although I think this one is even more important as
vello_cpu currently accepts only premultiplied images while vello
classic only unpremultiplied. This will hopefully allow vello_cpu to use
peniko's image type natively.

---------

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Co-authored-by: Daniel McNab <36049421+DJMcNab@users.noreply.github.com>
github-merge-queue Bot pushed a commit to linebender/vello that referenced this pull request Oct 2, 2025
This is possible because of
linebender/peniko#120.

---------

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants