3 ms·
None of what's outlined on that blog has anything to do with Rust. And wgpu has to validate code for undefined behavior because it needs to run in browsers, as
by Jweb_Guru 5y ago
None of what's outlined on that blog has anything to do with Rust. And wgpu has to validate code for undefined behavior because it needs to run in browsers, as well as translate it to other backends that aren't SPIRV--it again doesn't really have anything to do with Rust. In fact according to the Rust memory model, most UB on the GPU would technically be okay (though obviously not ideal) but not in the context of a browser. So just saying "eh that stuff is undefined" or "this is just Rust stuff" doesn't really address the issues outlined there.
- Ygg2 5y agoAdmittedly I don't know kvark, but some of his statement there were wrong, in a way that gives impression he didn't do much 3D programming before hand. That's why I imagine he worked on the If one were to go through a point by point rebuttal, it'd go like this: - Not knowing you need to have entry point for the shader to be executed. - kvark's complaint about OpFmod being misnamed are kinda missing the point, % isn't the mod operator but remainder operator (in C/C++) - https://mobile.twitter.com/TheSpydog/status/1232819839888166912 https://mobile.twitter.com/TheSpydog/status/1232819839888166... You know it's a pretty bad idea when Unity and Adobe are begging you not to do this. - I mean what you prefer to write? GLSL: int a = 2 for (int i = 0; i < 4; i++) { a *= 2 } WSGL: const a: i32 = 2; var i : i32 = 0; loop() { break if (i >= 4); a = a * 2; continuing { i = i + 1; } }
- Jweb_Guru 5y agokvark is a GPU expert who's worked on GPU programming, 3D games, and GPU standards for years now. And he's not the only one working on naga, either. I'm also really not sure how you got the first point from what he wrote. He was not saying he was surprised to find "you need to have an entry point" he was saying the restriction made no sense, and that existing tools didn't even take advantage of having more than one entry point due to driver bugs. The rest of your points are basically just opinions masquerading as something else. In any case I don't actually care how hard WGSL is to write, because I don't have to write it (you can go through a translation layer). What I'm not going to do is pretend that SPIR-V is a great choice for this intermediate layer solely on the basis of what I've heard from other graphics people who haven't actually tried to use it for that purpose--which is exactly what the article is about.
- Ygg2 5y agoKvark's good, but he's still fallible. And I don't know what games he made, but I can tell you, others that had experience with shipping games/software, laughed his articles out loud. > he was saying the restriction made no sense So presented with reality of a complex, buggy drivers, his solution is - to ignore it? Wow imagine in UTF-8 people just said, yeah 8bit 0 are ok everywhere and caused hundred of billions of lines of code to be written to deal with null mid UTF8 stream. > I don't actually care how hard WGSL is to write Awfully dismissive. Well, ok, you won't have to write it but someone will. And those someone are going to curse whoever wrote that abomination of a spec. A spec that: - That doesn't respect backwards compatibility - Looks like pure torture to write in - Misunderstands some part like OpRem I'm not very confident in it to be honest. Looks to me just another overly elaborate moat for browser implementors.