Skip to content

write_texture with js_sys::ArrayBuffer #4767

@zeroexcuses

Description

@zeroexcuses

Related to #4128

Is there a way for write_texture to take a js_sys::ArrayBuffer instead of an &[u8] as input? Usage case: I'm getting a js_sys::ArrayBuffer from another webworker's post_message.

https://rustwasm.github.io/wasm-bindgen/api/js_sys/struct.ArrayBuffer.html
https://docs.rs/wgpu/latest/wgpu/struct.Queue.html#method.write_texture

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: apiIssues related to API surfacebackend: webgpuIssues with direct interface with WebGPUtype: enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions