Live data from Hacker News

WebGPU and WSL in Safari

webkit.org

121–130 of 186 posts

Re: WebGPU and WSL in Safari

#121
post #113

Earlier quoted context omitted.

> A bigger question though that needs to be resolved is how to specialize SPIR-V shaders. Is the OpSpecConstant family not enough? Those exist specifically for specialisation.

Specialization constants don’t seem to cut it for all the use cases. There’s variation beyond plugging in constants. Also some frameworks and engines give their clients the ability to provide shader snippets at runtime.

The answer to shader snippets in the SPIR-V world would be linking. I don't think that's well developed in the ecosystem if at all, but it's a perfectly natural extension.

Re: WebGPU and WSL in Safari

#122

The course of development with WebGPU initiative is breathtaking. The effort poured into the API is producing content that will be consumed by people that desire to study GPGPU applications. Included in the final specification or not, a well-tailored shading language is only of benefit to the GPGPU community, similar to how simultaneous existence of DirectX, Metal, Vulkan has been to the robustness of the abstraction…

The claim that the developers shaping the WSL specification are experts is questionable given that the actual experts in shading languages -- i.e., the implementers building GPU hardware -- are looking at SPIR-V and seem to be pretty frustrated by the NIH syndrome of the web developer community here.

Re: WebGPU and WSL in Safari

#123
post #118

Earlier quoted context omitted.

Update: the demo site doesn't work for me either. There's a 404 in the console for https://webkit.org/demos/webgpu/babylon/babylon.max.js.map .

I've reported the video issue to the author. The demo site requires STP 91 or newer with the WebGPU experimental feature enabled.

I'm using Safari Technology Preview Release 91 (Safari 13.1, WebKit 15609.1.3) on a MacBook Pro (Retina, 13-inch, Early 2015) running macOS Catalina 10.15 Beta (19A558d) with the WebGPU experimental feature enabled and not seeing anything. I'd be happy to file a WebKit bug or Feedback Request if you'd like.

Re: WebGPU and WSL in Safari

#124
post #103

As a cross-platform graphics developer who is currently knee-deep in papering over platform incompatibilities, what I mostly care about at this point is compatibility . I don't care about shader size or compilation time, as long as both are reasonable. I do care about having yet another shading language to cross-compile to. Please, everyone, just use something that already exists. It is frustrating how the big player…

> There is almost no cost to the platform developers to add new APIs To anyone who has ever spent time working on a platform API this is deeply insulting. > …the costs are borne by the application developers. Yes, whereas with cross-platform, least common denominator APIs the cost is borne by end users. This is literally the attitude that lead to Java applets and then Flash, then later mistakes like Web SQL and (P)Na…

WebSQL wasn't a mistake.

It make an enormous amount of existing code available on the web.

It just wasn't agreed to by Firefox because it didn't have enough JS.

Re: WebGPU and WSL in Safari

#125
post #66

As a cross-platform graphics developer who is currently knee-deep in papering over platform incompatibilities, what I mostly care about at this point is compatibility . I don't care about shader size or compilation time, as long as both are reasonable. I do care about having yet another shading language to cross-compile to. Please, everyone, just use something that already exists. It is frustrating how the big player…

I miss the years where inspite of all its flaws, OpenGL was a non deprecated option on all the platforms. I know it left performance on the table, I know the drivers for some vendors were iffy and I know reasoning about performance across different vendors / drivers / platforms was difficult - but it worked most of the time and allowed me to have a mostly unified codebase everywhere.

WebGL is like that now.

Re: WebGPU and WSL in Safari

#126
post #87

Earlier quoted context omitted.

Only when "all platforms" leaves out game consoles, which never had full support for OpenGL, besides a timid attempt with GL ES 1.0 + Cg on PS2.

It's true, but for most applications, games consoles are not even a consideration. There's a mountain of programs that only target Windows, Linux, macOS, Android, and iOS or some subset thereof.

Doesn't change the fact that OpenGL was never available in all platforms, regardless how often one spreads that urban myth.

Even on Mac OS it wasn't available, rather Quickdraw 3D was the API to go to.

Had Apple been successful with their in house OS, and surely they wouldn't have cared about OpenGL.

Re: WebGPU and WSL in Safari

#127
post #103

Earlier quoted context omitted.

> There is almost no cost to the platform developers to add new APIs To anyone who has ever spent time working on a platform API this is deeply insulting. > …the costs are borne by the application developers. Yes, whereas with cross-platform, least common denominator APIs the cost is borne by end users. This is literally the attitude that lead to Java applets and then Flash, then later mistakes like Web SQL and (P)Na…

This seems a somewhat ill-informed comment, since you shouldn't be thinking of something like Vulkan as a platform API in the first place. Vulkan (and most other APIs, e.g. OpenGL) is an almost entirely platform-independent API targeting modern GPUs. There are a small number of platform-dependent entry points for window system interaction and such like, but their surface area is a very small percentage of the overall…

And it shows, given the lack of tooling versus what platform APIs offer out of the box.

Instead of a modern API, frameworks, 3D model format, IDE support for debugging shaders, we get plain old C, extensions creep, and go search yourself for basic feature like displaying text or loading textures.

Hardly an improvement on OpenGL status quo.

Re: WebGPU and WSL in Safari

#128
post #103

Earlier quoted context omitted.

> There is almost no cost to the platform developers to add new APIs To anyone who has ever spent time working on a platform API this is deeply insulting. > …the costs are borne by the application developers. Yes, whereas with cross-platform, least common denominator APIs the cost is borne by end users. This is literally the attitude that lead to Java applets and then Flash, then later mistakes like Web SQL and (P)Na…

> To anyone who has ever spent time working on a platform API this is deeply insulting. I've worked on platform APIs too. Maybe "almost no cost" wasn't the right phrase, but there's certainly less cost for the platform vendor. > Yes, whereas with cross-platform, least common denominator APIs the cost is borne by end users. It's a tradeoff that has to be evaluated on a case-by-case basis. So far I haven't seen argumen…

My critique on all of these remains largely the same since we tried doing WebCL:

-- Path 1: We do need a leap here, and that leap should be essentially unleashing GPGPU primitives (memory barriers, etc.). The web is a ~decade behind, when we have a chance to 10X+ over what regular apps do.

-- Path 2: If not, then pure conservative standards work a la webgl2. Useful, and should take care for politicking to not prevent Path 1 from happening in parallel.

It's disconcerting for, ~7 years later, the same problems to keep happening.

Re: WebGPU and WSL in Safari

#129
post #118

Earlier quoted context omitted.

I've reported the video issue to the author. The demo site requires STP 91 or newer with the WebGPU experimental feature enabled.

I'm using Safari Technology Preview Release 91 (Safari 13.1, WebKit 15609.1.3) on a MacBook Pro (Retina, 13-inch, Early 2015) running macOS Catalina 10.15 Beta (19A558d) with the WebGPU experimental feature enabled and not seeing anything. I'd be happy to file a WebKit bug or Feedback Request if you'd like.

Please do! It's working for me with STP 91 on a Catalina beta build. Could be a hardware-specific issue. A bug report would be useful. Please Cc mjs at apple dot com and I'll make sure the right people see it. For reference, do the other demos in the gallery work for you? https://webkit.org/demos/webgpu/

Re: WebGPU and WSL in Safari

#130
post #106

Earlier quoted context omitted.

But no tests for the web safety layer afaik.

I think we should focus more on the advantages and disadvantages of WSL and SPIR-V, and their relevance to existing or future ecosystems -- not debate over which language had the first web tests.

When someone says one option is a nonstarter because it's new and immature, I think its fair to look at different signs of maturity to evaluate that statement.

(I personally don't think any option is a "nonstarter" but it's hard to even get agreement on the relevant evaluation criteria.)

Post reply on HN