Comments (5)
Firefox has had some long-term hopes of actually never producing RGBA data from video decoders, software or otherwise, and producing only NV12-ish formats, which would allow us to simplify our external texture support. If the WebGPU specification were to allow content to pass ordinary GPUTexture
s to shaders operating on texture_external
s, then we would have to support RGBA external textures in perpetuity.
So it depends on how excited people are about binding non-external texture views to texture_external
variables:
-
If people are really excited, then it's a valuable feature to the audience, and we should spec it as yet another helpful thing.
-
If it's just a "nice to have, and it's free" feature, then we should not provide it, as it does prevent simplifications we were hoping to pursue at some point in the future.
("Is this a cute bracelet, or an annoying handcuff?")
from gpuweb.
I'm surprised that Firefox would want to make video frames always NV12 (even though for most hardware or actual video thing it is much preferred) because it is supportive of WebCodecs and the VideoFrame
constructor can take things that are RGB(A) data.
This is more than a pure nice to have feature because we have some folks working on video processing pipelines that introduced a copyExternalImageToTexture
to convert a VideoFrame
to a GPUTexture
because it was more architecturally tractable to have texture_2d<f32>
everywhere instead of dynamically generating that or a texture_external
. So now they have a 1-copy path instead of a 0-copy. If they could use texture_external
everywhere by feeding a GPUTexture
in the binding, they would easily get to 0-copy.
from gpuweb.
GPU Web 2024-03-06 Pacific-time
- KG: concern that this constrains our implementation of external textures. Had some positive signals from our media team that it might be possible that all video formats are 2-plane NV12 style formats. In that case, tempting to implement this to support this. But if external textures support canvases, would want them 4-channel, 1-plane textures.
- KN: [external texture from canvas] has been discussed, but not proven that it was needed. And it's a bunch of work to implement.
- KG: if we had that, would be easier for us to agree to this - it wouldn't constrain us, because we'd already have the constraint.
- KN: Corentin points out that VideoFrame can be constructed from RGBA data as well.
- KG: would receive that as bytes.
- KG: spooky to me - crosses concerns, hard to know it'd be sound going into the future.
- KG: this is an area where impl experience is needed. PR welcome adding this to the draft spec. Chromium can then implement behind a flag.
- KG: What if we could create an externalTexture from a texture-view, rather than allowing binding either an ExternalTexture or a TextureView? Just wrap a TextureView in an ExternalTexture and bind that.
- KN: small hesitation that it sounds like it accepts GPUTexture from another GPUDevice (since it’s “external”), but this would not be allowed. Otherwise seems fine.
from gpuweb.
Sure! Ok I didn't realize that videocodec accepted those, so that forces us to handle it, so we're ok with this I think.
from gpuweb.
GPU Web CG 2024-03-13 Atlantic-time
- KG: yes, didn't realize video codecs can give you coplanar data. Given this, this sounds fine.
- CW?: Question then, do we allow creating ExternalTexture from such a textureview, or just allow putting such textureviews in the bindgroup.
- JB: may as well just allow binding GPUTexture to an external texture in createBindGroup?
- KG: [weakly would prefer to create ExternalTextures in order to reuse semantics. We’ll discuss more]
- CW: let's discuss offline.
from gpuweb.
Related Issues (20)
- PNG ImageBitmap (WebAPI) incompatibility with `copyExternalImageToTexture` for physically-based workflow. HOT 6
- Should there be a limit on the number of open GPUCommandEncoder instances? HOT 35
- Should bitcast tests allow FTZ on inputs/outputs? HOT 4
- Does an override need to be statically used by the entry point to be allowed? HOT 8
- Incorrect validation error with dispatchWorkgroupsIndirect HOT 2
- Add a diagnostic triggered when a pipeline-constant is set for an override in the shader module that is not used by the entry point
- Clarify supported context formats definition HOT 1
- Do pipeline-creation errors encompass the whole module or just the GPUProgrammableStage? HOT 3
- Syntax problem in English HOT 1
- Texture Format RGBA32Float Does Not Support Storage Texture Access StorageTextureAccess::ReadWrite HOT 1
- Clamping behavior when comparison sampling `depth24plus` HOT 6
- Hardware feature levels (and compat) HOT 6
- GL_EXT_fragment_shader_barycentric HOT 1
- GPURenderCommandsMixin.draw / drawIndexed allows for the execution of far too many vertices HOT 10
- Unclear who "consumer" is. HOT 1
- Allow all vertex input attributes to be considered OOB if at least one is (in the "process vertices" algorithm) HOT 2
- Clarification regarding double negation (--) operator? HOT 3
- Type inconsistency between drawIndexed and drawIndexedIndirect calls HOT 1
- It should be possible to define an 'override' that evaluates depending on other 'override' constants HOT 7
- Static Samplers Proposal HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gpuweb.