这是indexloc提供的服务,不要输入任何密码
Skip to content

copyExternalImageToTexture with byte-exact uint format #5157

@unconed

Description

@unconed

Current behavior:
When trying to use the texture format rgba8uint as destination for a copyExternalImageToTexture from a PNG, Chrome reports an invalid destination format.

Expected behavior:
Copying to a uint texture does a byte-exact copy from the source pixel data.

The spec does not mention pixel formats specifically for external texture copies... the implication seems to be that color space conversion would require a float / unorm source and destination.

It is useful to use uints if you e.g. have data losslessly encoded in a .PNG and wish to sample it directly on the GPU. Right now you have to decode it with ImageDecoder and then upload it as a buffer instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    apiWebGPU APIfeature requestA request for a new GPU feature exposed in the API

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions