Wgpu-0.10 released: WebGPU implementation now in pure Rust
31–40 of 86 posts
Re: Wgpu-0.10 released: WebGPU implementation now in pure Rust
#32Earlier quoted context omitted.
> This isn't obviously true. WebGPU API surface is fairly small (unlike Vulkan), and Bevy may easily use most of it. Small is not the issue. Generality is.
Keep in mind that wgpu is intended to be something you can write a game engine in and achieve at least comparable performance to going through something like Vulkan directly. The WebGPU API is intended to be optimizable enough that even low-level applications don't need to reach for their own solutions, and the WebGPU team have worked very hard to find universal and efficient abstractions over the underlying drivers.…
My concern isn’t that wgpu’s level of generality makes it unsuitable for implementing a game engine. It’s of course perfectly suitable for implementing a game engine. The concern is around the pitfalls of not architecting your game engine in terms of your own limited graphics abstraction (which may backend to wgpu).
Re: Wgpu-0.10 released: WebGPU implementation now in pure Rust
#33So I'm familiar with WebGPU, but I'm not really sure why there would be a native (non-web) implementation of it. What are the practical uses of this, as opposed to just using something like Vulkan?
Re: Wgpu-0.10 released: WebGPU implementation now in pure Rust
#34Earlier quoted context omitted.
As someone who's developed and maintained platform backends for all sorts of obscure platforms (actually, it's still my day job!), I don't think wgpu backends are going to be difficult to develop for any of the remaining platforms APIs still alive. It's a pretty well-thought-out API that mirrors most of the modern rendering abstractions seen in game engines.
> platforms APIs still alive. The APIs that currently exist are not the cause of the potential issue I am raising.
Re: Wgpu-0.10 released: WebGPU implementation now in pure Rust
#35So I'm familiar with WebGPU, but I'm not really sure why there would be a native (non-web) implementation of it. What are the practical uses of this, as opposed to just using something like Vulkan?
Cross platform. You could build a rust app with a WebGPU target that runs across web and native.
Re: Wgpu-0.10 released: WebGPU implementation now in pure Rust
#36Earlier quoted context omitted.
As someone who's developed and maintained platform backends for all sorts of obscure platforms (actually, it's still my day job!), I don't think wgpu backends are going to be difficult to develop for any of the remaining platforms APIs still alive. It's a pretty well-thought-out API that mirrors most of the modern rendering abstractions seen in game engines.
> platforms APIs still alive. The APIs that currently exist are not the cause of the potential issue I am raising.
* 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).
Re: Wgpu-0.10 released: WebGPU implementation now in pure Rust
#37Re: Wgpu-0.10 released: WebGPU implementation now in pure Rust
#38This is great. I switched my renderer from OpenGL to wgpu for my engine and I cannot exaggerate how much better the error reporting is. Instead of "working incorrectly" or simply not working and providing a vague error code (like OpenGL), wgpu tells me exactly what I did wrong, which is a life saver. Also - types. Thanks wgpu team!
Re: Wgpu-0.10 released: WebGPU implementation now in pure Rust
#39So I'm familiar with WebGPU, but I'm not really sure why there would be a native (non-web) implementation of it. What are the practical uses of this, as opposed to just using something like Vulkan?
Re: Wgpu-0.10 released: WebGPU implementation now in pure Rust
#40This is great. I switched my renderer from OpenGL to wgpu for my engine and I cannot exaggerate how much better the error reporting is. Instead of "working incorrectly" or simply not working and providing a vague error code (like OpenGL), wgpu tells me exactly what I did wrong, which is a life saver. Also - types. Thanks wgpu team!
Does wgpu finally support OpenGL?