Skip to content

Open question: How to deal with buffers that need lots of reads/writes #2

@MendyBerger

Description

@MendyBerger

There are a few cases where we'll have buffers that need to take lots of reads/writes, and are not in linear memory.
Examples include gpu-buffer when mapped to CPU, and frame-buffers.
How should we go about those?
Here are some options I've thought of, none of them seem particularly good to me:

  • Just copy everything over as list<u8>. Obviously slow.
  • Have an external resource, with .get()/.set() methods. Prob slow since every .get()/.set() will have to cross the wasm boundary, but might still be best option with current capabilities.
  • Find some magic way to map it to linear memory. Don't think this is actually possible.

Thoughts anyone?

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions