Skip to content

Texture from ID3D12Resource/ID3D11Resource? #6228

@mycrl

Description

@mycrl

I've tried searching the issues have looked at crate's documentation and there doesn't seem to be a way to directly use resources from other D3D devices right now, such as 2d texture, is that because of something that's causing a blockage or is there a plan in place but no support right now?

I'd probably want an interface like Texture::from_raw_texture or something like that, where the user handles the use of different raw textures under different backends themselves.

There doesn't seem to be any way to do this or an alternative at the moment, except for a custom wgpu backend, I guess.

This is useful in scenarios where high performance hardware acceleration is required, for example, the frame output from a hardware video decoder is ID3D11Resource2DTexture, which the wgpu would need to transfer to memory via the cpu and then submit to the wgpu's memory by copying the texture from the software, which is an expensive way to do it! .

I'm just illustrating the use of D3D devices here, other backends should be able to provide support in the same way.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions