6 ms·
Wow, WebGPU support is really cool. Graphics is usually an afterthought in programming language runtimes, which is crazy when you consider that most devices the
by modeless 6y ago
Wow, WebGPU support is really cool. Graphics is usually an afterthought in programming language runtimes, which is crazy when you consider that most devices these days have a GPU which is physically larger and has far more raw compute power than the CPU.
I understand why. The extremely proprietary and platform specific nature of graphics APIs and hardware makes it hard. WebGPU is a good choice for portability.
- coding_lobster 6y agoI was under the impression that Deno is a runtime mostly intended for the server environment which is probably an area where GPU presence isn't generally as strong as on other types of devices outside of the applications that specifically need it. I could be wrong of course about anything or everything.
- dexwiz 6y agoWebGPU is an abstraction over classic graphics and newer compute APIs.
- pocketgrok 6y agoNot necessarily. Ryan has said a major motivation for creating deno was to let JS compete with Python for local scripting and ML.
- dexwiz 6y agoLooks like they are using wgpu, which is the main (only?) implementation of WebGPU. Seems like WebGPU will work because everyone is going to ship the same shim (wgpu) over the top of proprietary APIs.
- crowlKats 6y agoThere is also Google's Dawn implementation
- modeless 6y agoThere are three implementions of WebGPU in development for the three browser engines. Dawn for Blink and wgpu for Gecko are cross platform, and I think Apple may be doing something Metal-specific for WebKit.
- jsheard 6y agoBoth Dawn and wgpu are standalone libraries too, so applications other than Blink/Gecko can plug either in to get a Metal-ish abstraction that works everywhere It will be nice to finally have a portable 3D API that's sanely designed (unlike OpenGL) and that non-experts can be expected to handle (unlike Vulkan)
- dagmx 6y agoYep this is the reason I'm so excited by webgpu. I'd love the multi platform support of OpenGL with the features all the new APIs bring.
- singularity2001 6y agowhat makes wgpu more sanely designed than opengl? to me both look similarly horrifying: http://austin-eng.com/webgpu-samples/samples/rotatingCube?wgsl=1 http://austin-eng.com/webgpu-samples/samples/rotatingCube?wg...
- flohofwoe 6y agoWebGPU is the common cross-section of the modern 3D APIs (Metal, D3D12 and Vulkan). In general, and somewhat simplified, those APIs move all the expensive render-pipeline-configuration out of the render loop and into the initialization phase. So your code is much more "front-loaded" than GL, but once everything's initialized, the actual rendering is much less code and has much less overhead because most render-state has been pre-compiled into immutable objects. OpenGL on the other hand is a highly dynamic state machine where flipping a single "switch" can lead to expensive reconfiguration of the render pipeline during rendering.
- skocznymroczny 6y ago
- remexre 6y agoKinda :/ on there not being a GPU permission (that I can find in the post or the docs); GPUs/GPU drivers have been a vector for some pretty nasty attacks in the past...
- FlashBlaze 6y agoSince there is no permission requirement as such, could a malicious user use my GPU for mining?
- remexre 6y agoThat's part of my concern, though since scripts can use the CPU arbitrarily, they could already mine on the CPU. A larger concern is bugs like [0], since GPU drivers are highly complex and highly privileged code. [0]: https://bugs.chromium.org/p/project-zero/issues/detail?id=2092 https://bugs.chromium.org/p/project-zero/issues/detail?id=20...
- shadowtime2000 6y agoYeah that could happen. There was some discussion about a permission in the Discord though, but I don't think it was ever added or thought about on GH.
- deleted 6y ago[deleted]
- girvo 6y agoWithout the net permission to their server, mining wouldn’t achieve much, no? I might be missing something obvious though
- modeless 6y agoFor years WebGL has been exposed to every website you visit with no permission prompt, and WebGPU soon will be too. It is possible to expose GPUs securely and the WebGPU API is designed with sandboxing and security in mind. Edit: I believe the bug you linked below (https://bugs.chromium.org/p/project-zero/issues/detail?id=2092 https://bugs.chromium.org/p/project-zero/issues/detail?id=20...) can't be exploited through WebGL or WebGPU in the browser because all GPU access is remoted to a separate process with a special GPU sandbox. I don't know if Deno does this but it should.
- pmarin 6y ago> I understand why. The extremely proprietary and platform specific nature of graphics APIs and hardware makes it hard. And hardware bugs, crappy drivers, etc
- baxuz 6y agoHere's hoping that we'll soon be able to port FFmpeg in its entirety to WASM + WebGPU.