3 ms·
There are only like 21 resource types in the whole WebGPU API. Which of these do you think are going to go away? * Adapter, Device, Queue, Surface * Buffer,
by Jweb_Guru 5y ago
There are only like 21 resource types in the whole WebGPU API. Which of these do you think are going to go away?
* Adapter, Device, Queue, Surface
* Buffer, Texture, TextureView, Sampler, QuerySet, BindGroup
* ShaderModule, BindGroupLayout, PipelineLayout, RenderPipeline, ComputePipeline
* CommandEncoder, RenderPassEncoder, ComputePassEncoder, RenderBundleEncoder, RenderBundle, CommandBuffer
Adapter, Device, and Surface are abstractions that would be needed no matter what the GPU architecture. What else is there that's even fishy... QuerySet, maybe? The various kinds of encoders are already abstractions on some platforms, and I guess there are cases where there might be better resource binding abstractions, but I'm not sure what could cause this set of supported features to change on the hardware other than completely dropping the rasterization pipeline (in which case you can just emulate everything with compute shaders and buffers anyway). And the relationships between these structures are pretty well-specified, I doubt that will change either.
So at that point, at least if you want to stay cross platform, you're talking about things like the specific implementation of buffer mapping or tracing or whatever, which is the sort of thing it's relatively easy to add as an extension (or refactor to make more configurable).