Skip to content

Conversation

@197g
Copy link
Member

@197g 197g commented Jul 21, 2025

This adds a major interoperability item to image-canvas. You can now create a plane of referenced byte data (PlaneDataRef/PlaneDataMut) and bind these to the ConverterRun like you would bind any other plane. This allows you to read texel inputs and write texel outputs to unaligned ranges of memory or otherwise memory that is controlled by the library. We thus complete a part of the promise of having all texels be Pod, that is we do not enforce invariant on the data part itself.

Note the minimalism of this PR, many of the lines are spent on making sure that we propagate some simplifications down to image-texel (cloning the layout) and book-keeping to just duplicate the indexing and buffers we have for other plane types. This is owed to having prepared Unaligned<T> in previous PRs, this new plane type and capability for DataRef is a straightforward application of this concept.

197g added 2 commits July 21, 2025 23:39
These interact with the shader / conversion machinery. We can load any
texel even from an unaligned location, not optimally but of course it
does work for all Pod types. Notably these are not optimized for simple
shuffles, yet, despite intrinsics spending most of their work in the
shuffle instructions and only little bit in what would be loadu and
storeu.
@197g 197g merged commit 4a0cb44 into master Jul 21, 2025
8 checks passed
@197g 197g deleted the data-shader branch July 21, 2025 23:21
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