26 ms·
WebGPU now available for testing in Safari Technology Preview
- neoberg 3y agowhat's that mouse cursor in the demo video?
- bhouston 3y agoYou can track over time the availability of WebGP on browsers via https://web3dsurvey.com/webgpu https://web3dsurvey.com/webgpu. It is already up to 57% of browsers surveyed.
- rwbt 3y agoIt'll be very nice if Apple also releases a standalone WebGPU.framework (or just expose the APIs in WebKit.framework) so we can finally have a true cross-platform OpenGL successor for native development.
- aseipp 3y agoCan't you have that today by using Dawn (used by Chrome) or wgpu (used by Firefox) as a dependency? That said, a third implementation would be nice, too!
- rwbt 3y agoA third implementation and also having a WebGPU.framework built-in and shipped with the OS (like all other first party frameworks) would simplify the build and debug process.
- tormeh 3y agoWhy? Isn’t it easier to bundle your dependencies rather than deal with whatever may or may not be installed on the client system?
- rwbt 3y agoDawn & wgpu projects are great but having native WGSL support with-in Xcode would be pretty nice. They already have the whole spec implemented anyways, why not as a standalone framework?
- dagmx 3y agoIf it was a system vended framework you wouldn’t be beholden to whether it’s installed or not. It would just be available from a given OS version onwards. That means easier builds for the developer, smaller apps, receiving implicit upgrades in lockstep with the OS. Take the example of new metal versions enabling new optimization avenues. Bundling your own dependency would mean that you need to keep on top of the changes to take advantage of it , but with a system framework you’d get it whenever Apple’s engineers enable it.
- JeffSnazz 3y agoThe cross-platform "OpenGL successor" seems to be gfx-rs. It's not clear why one would expect a specific vendor to champion this.
- sccxy 3y agoGive it at least few major iOS updates before it is usable. It is almost a rule with webkit new features. Those new APIs almost work, but you need to use user-agent detection to make sure it really works and it does not fail randomly/silently when it is in home screen or some other iOS browser.
- breckenedge 3y agoSafari Technology Preview is not available on iOS.
- deleted 3y ago[deleted]
- isodev 3y agoUser agent detection is never a good idea, perhaps just checking if the api is available and if a device can be obtained (see samples on the WebKit website) is enough (and reliable). As with all STP releases, this is the time to report issues before the feature makes it into the next version of Safari.
- sccxy 3y agoProblem is that iOS has bugs, even if feature is available and detected but it does not work in PWA or other webkit browsers… It just silently fails. UA detection is needed for detecting bug version. For example Wake lock API has been broken from iOS 16.4 that is like over 9 months. Or zindex rendering was flickering between iOS 15.7 to 16.4 Some renderings work in Desktop safari but it is different in mobile safari with same version. It sucks but it is reality of iOS developer experience.
- orenlindsey 3y agoI tried it and it didn't work. Downloaded Safari Technology Preview on my 2023 MBP and it returned various errors in all the WebGPU demos I tried.
- dev_tty01 3y agoDid you enable the required developer flags? From the preview page: To enable WebGPU, turn on the “WebGPU”, “GPU Process: DOM Rendering” and “GPU Process: Canvas Rendering” feature flags in the Feature Flags tab in Safari Preferences. If you don’t see the Feature Flags tab, you need to first check “Show features for web developers” in the Advanced tab.
- singularity2001 3y agoThe last time I tried it they had a different API to chrome. you can check the Apple examples the methods and values have slightly different names
- sroussey 3y agoAfter enabling the feature flag, the samples here worked fine: https://webgpu.github.io/webgpu-samples/ https://webgpu.github.io/webgpu-samples/
- mistersquid 3y ago> Downloaded Safari Technology Preview on my 2023 MBP and it returned various errors in all the WebGPU demos I tried. Same here. Took a beat to realize I was looking at the OP and WebGPU demos in Safari.app instead of Safari Technology Preview.app.
- fidotron 3y agoI am torn about WebGPU - on the one hand it is a necessary improvement, but it does radically increase the attack surface area in ways that just a few years ago would have been complained about by the browser security teams. (The spectre countermeasures around high resolution timing can still bite you). This makes me suspicious that something has changed to push the balance here, and it must be something to do with trying to offload the execution of LLMs and related neural networks on to clients to reduce the cost of doing it server side.
- michaelt 3y agoCurrent LLMs have vram and power requirements that mean it’s unlikely we’ll see a decent LLM running on phones without a step change in technology.
- sigilis 3y agoI currently have mistral 7b running on my phone through the MLCChat app. The performance isn’t too bad for something running on phone hardware. I’d consider that decent, if not world beating.
- deleted 3y ago[deleted]
- armchairhacker 3y agoI think browsers should require sites to request access to WebGPU like they do location and camera. If a random webpage is asking to use my GPU (especially if it's a sketchy-looking site I just got redirected to), that would raise flags and I'd deny access. If a game or visualization requests access, especially if it's something I've heard others praise, I'd take the risk. Sure, someone could embed a vulnerability in some decent app which uses the GPU for actual rendering, but it's a lot harder.
- MBCook 3y agoEven w/o a vulnerability a GPU is a great way to burn battery on a mobile phone fast thanks to some stupid effect on a web page or in an ad. I like the permission idea.
- atarian 3y agoVery interesting how similar the code for setting up the pipeline is similar to Metal.
- adastra22 3y agoThat’s not a coincidence.
- MBCook 3y agoWasn’t the design of WebGPU heavily influenced be Metal? Or was it that metal came from a team in Apple that helped work on WebGPU?
- moron4hire 3y ago"Helped" is one way to describe it. "Sat down and kicked their feet until they got their way" is another.
- int_19h 3y agoWhat were the better options at the time?
- adastra22 3y agoOr standards bodies exist in practice to push vendor solutions on others. Apple plays that game well.
- isodev 3y agoIsn’t it nice when standards just happen to come together. I like the similarities, it certainly helps when switching from one to the other.
- troupo 3y agoApple and Mozilla presented WebGPU as basically a clone of Metal. Then the standard changed a bit, but it was still based on modern GPU APIs
- sroussey 3y agoI am looking forward to this coming to Bun!
- timenova 3y agoI remember Safari had a flag for WebGPU a year or two ago. I even tried some samples and it seemed to work. Does anyone know why they removed it in the middle? IIRC Safari had the flag too that time, not just the Technical Preview.
- modeless 3y agoThat was not the current WebGPU. It was essentially a different API proposed by Apple at the start of the standardization process. The final standard has little in common.
- ksec 3y agoIt seems most comments are mostly interested in some sort of LLM or Gaming on the web. I am more interested in how it will shape Desktop applications that is currently on electrons. And in many ways ( the web ) we are reinventing what Java was doing 15 years earlier.
- KeplerBoy 3y agodid Java ever have support for GPGPU besides dodgy bindings for CUDA?
- eachro 3y agohows the experience of writing webgpu code? Last I checked some tutorials out, you still had to write the code inside a string without syntax highlighting. Has this changed?
- bschwindHN 3y agoIf you're talking about the shading language WGSL, yes if you inline it in your code you won't have syntax highlighting (unless your editor happens to support that usage). Depending on your code infrastructure you can have it in separate files though with syntax highlighting. It's just a string you pass to an API, after all. It's not really anything to do with WebGPU in particular.
- Widdershin 3y agoTreesitter based highlighting can handle nested languages in some cases, maybe that’s available for your editor?
- pjmlp 3y agoI never understand why people do this, as if writing a little fetch function to load shader files was the end of the world. https://github.com/pjmlp/webgpu https://github.com/pjmlp/webgpu
- crakenzak 3y agoIs it just me, or does it feel like Apple is putting more effort behind WebKit as of late? It’s slowly becoming closer to chromium in cutting edge feature support.
- deergomoo 3y agoThey probably see the writing on the wall for their current restrictions on third-party browser engines, and are as interested in avoiding a Blink monoculture as the rest of us.
- jug 3y agoI was thinking the same when I saw the release notes of the latest Safari stable version but wasn't sure if it was just me paying more attention than usual... :)
- echelon 3y agoApple simultaneously doesn't want to become a thin client to the browser, yet they also see 3D/GPU/AI as the future and want to be at the forefront. They don't want to cede local compute to cloud and edge services. This is shaping up to be a fun battle ahead.
- mplewis9z 3y agoI agree. They know their time is coming with being forced to allow other browser engines, and are actually putting in an effort now that there’s competition on the horizon.
- brycewray 3y agoIf only Apple would free Safari from the OS release cycle, the way Microsoft did with Edge when the latter became Chromium-based.
- deergomoo 3y agoI'd like to see it extended to all their bundled apps. I don't understand why a new version of e.g. Notes needs to be tied to an OS release.
- vinni2 3y agoFinally time to run LLMs on browsers.
- drunklol 3y ago[dead]
- fragmede 3y agoYes! Whisper's already running there, just need to get a bit further. https://whisper.ggerganov.com/ https://whisper.ggerganov.com/
- magicmicah85 3y agoThis is so incredibly impressive. The tiny model did such a fantastic job of transcribing an audio file for me.
- mkw5053 3y agoI'm curious why Apple is now putting effort behind the web when it competes with their app store distribution. Don't get me wrong, I'm excited they are. I can imagine a bright future for consumers where games with native-level graphics are distributed via the web.
- rglover 3y agoThe web is getting more powerful and eventually will negate the need for native apps as the performance will be comparable or greater. I'd view moves like this to be preemptive efforts to remain competitive in the future.
- MBCook 3y ago> as the performance will be comparable or greater How could the performance of a web app ever be faster than a native app? That’s impossible.
- JayStavis 3y agoOn the webGL/GPU side, my cynical speculation is that the Apple has slowly been amassing a nest of graphics talent for the last 5 years (Metal, Vision Pro, ARKit, list goes on), and at this point they can't resist the pressure from employees to not support some of this stuff which should be table stakes and is obviously good for the user experience. On the PWA side, best guess is anti-competition scrutiny.
- jacobp100 3y agoSafari has been improving at rapid pace for a while now. They were the first to get ES6 support (and the only to implement tail calls), they’re usually the first with CSS features
- SquareWheel 3y agoI wouldn't say they're the first to get most CSS features. Usually just things that are more visual, like color spaces and theming. They still drag their feet on a lot of features, but they are getting better.
- 3836293648 3y agoSo is this a third implementation or is it using Dawn or wgpu?
- troupo 3y agoYou could call it the original implementation. Because Safari (in collaboration with Firefox) are the ones who presented the WebGPU proposal
- flohofwoe 3y agoWebGPU doesn't have much in common with Apple's original proposal (which was more or less a Javascript API around Metal). I suspect the new implementation is a complete rewrite from the original proposal, since earlier versions of Safari contained an implementation of the Apple proposal, which was then removed for a very long time while work happened on WebGPU.
- Lichtso 3y agoWhile that is true, it also true that Apple had a major influence on the current design and is e.g. the reason why we got WGSL [0] as a source language instead of a bytecode (a GPU WASM equivalent if you will). [0]: https://www.w3.org/TR/WGSL/ https://www.w3.org/TR/WGSL/
- slimsag 3y agoPeople keep spreading this incredibly misleading statement - god knows I do not like Apple's closed-source behavior, but at this point people are basically just spreading lies about the situation By all accounts, Apple's /only/ stance was that if WebGPU used SPIR-V it would be a non-starter for them, due to ongoing legal issues between Apple and Khronos. Apple actually proposed WebHLSL in collaboration with Microsoft, to have HLSL be the standard. Mozilla employee's stance[0] was that SPIRV was too low level, did not fit with the goals of WebGPU portability and security, and expressed concern that Khronos may add functionality to SPIRV they cannot support in WebGPU like raytracing instructions .. 'So we'd always be on the verge of forking SPIR-V in some way.' It was also noted by many people that even if a bytecode format was used, it would still have to be translated to the target (HLSL/DXIL, MSL, etc.) in almost the same way a text format would. Nobody proposed a 'GPU WASM equivalent' or an alternative bytecode format, only SPIRV was ever considered AFAIK. The hard truth is that shader compilation is a fucking nightmare, people do not realize how bad it is across the different native APIs. SPIR-V is good, but it doesn't solve that - and presents other challenges if you are a web browser API. Vulkan and SPIRV are not the golden goose many make them out to be. [0] https://github.com/gpuweb/gpuweb/issues/847#issuecomment-642883924 https://github.com/gpuweb/gpuweb/issues/847#issuecomment-642...
- jamesfmilne 3y agoI'd love a first-class WebKit-based browser on Linux. I have looked recently, am I missing one? Gnome Web is a like a Fischer-Price browser.
- deleted 3y ago[deleted]
- ho_schi 3y agoEpiphany is nice. Especially because it features a native toolkit with Gtk4. What few developers do is incredible :) Main issues: * Since introduction of sandboxing the memory-usage is far too high. It was pretty low before. * WebRTC. They had it nearly implemented years ago. Then removed it because they were unhappy with it. But their new approach isn’t available until now. * Many more developers needed. This means me? * Epiphany releases are linked to GNOME releases. Only applications which are integrated parts of GNOME should do that. The rigid six months release cycle is problematic. Regarding memory usage. Sandboxing depends on multi-process. The multi-process shouldn’t be an issue. The sandboxing was added in late 2019 and - if I remember correctly - Epiphany started to eat memory. Like probably most people I keep my tabs when closing/opening the Web-browser. The developers are nice and explained, that for all previous existing tabs a separate sandbox process and a render-process is already started with a blank page. And due to need separation no process is allowed to share memory with others. What is needed is only showing a label on the tab until the tab is actually used. And. Midori? There was previously also Midori using WebKitGtk. I liked it and it was pretty nice. But something awkward happened and an unrelated people took over the name and started to ship Electron (i.e. Google Chrome) as “Midori”. It looks untrustworthy to me, I recommend to not install it. If you use Midori on Archlinux you should be save - they ship and old and original version of Midori. But it is old. Apple, WebKit and WebKitGtk work together for many years. Good work.
- firtoz 3y agoWebXR will be nice too especially for iPhones...
- bhouston 3y agoI would love that. Finally across platform AR experience. Apple is using WebXR for the Vision Pro, but it isn't clear if it will ever be available on iPhones.
- mkeblx 3y agohttps://github.com/WebKit/WebKit/commit/7ad679f071434da45d453251ba7446294a54f57d#diff-3f267080617325c9746206b2aed1e1fbd1589e31e24d6281c8a7c0163315af40R469 https://github.com/WebKit/WebKit/commit/7ad679f071434da45d45...
- TheLoafOfBread 3y agoNow make Web BLE available as well, and I am happy.