News for hackers. Stuff that matters.
Re:RLSL: a Rust to SPIR-V Compiler by slavik81 on Monday October 21, 2019 @02:49PM (#21315821)
No relation. SPIR-V is the fifth iteration of the Standard Portable Intermediate Representation, originally based on the LLVM IR.

It's an intermediate representation between the high level shader programming language and the GPU's native machine code. It's expected that the GPU will compile the SPIR-V to its own internal instruction set, rather than executing it natively.

RISC-V, on the other hand, is a native instruction set for CPUs.

Re:RLSL: a Rust to SPIR-V Compiler by gmueckl on Monday October 21, 2019 @03:06PM (#21315995)
SPIR-V really is an intermediate representation of a program. There's no way that this can be executed without any further translation. But it stops driver developers from having to write and ship complex compiler front ends that deviate from language specs in subtle ways that the shader writers need to test for and work around.
Re:RLSL: a Rust to SPIR-V Compiler by phire on Monday October 21, 2019 @04:22PM (#21316868)
Yep, now shader writers only need to test for and work around backend bugs in drivers.

Also it makes gamedevs slightly happier that they don't have to ship the plain text source code of their shaders with games.

It doesn't provide any real security against RE, as SPIR-V is pretty close to being tokinized/SSAed GLSL and decompilers are trivial to implement. But if it makes them happier, so be it.

Re:RLSL: a Rust to SPIR-V Compiler by erichocean on Monday October 21, 2019 @05:32PM (#21317661)
> * SPIR-V is pretty close to being tokinized/SSAed GLSL*

SPIR-V is in SSA form; GLSL most definitely is not.

Re:RLSL: a Rust to SPIR-V Compiler by wtallis on Monday October 21, 2019 @04:43PM (#21317103)
I don't think that the V in SPIR-V has anything to do with the number 5. I think it's just that SPIR was renamed to SPIR-V with the major version that was introduced alongside the Vulkan graphics API and made SPIR usable for more than just OpenCL.
Re:RLSL: a Rust to SPIR-V Compiler by slavik81 on Monday October 21, 2019 @05:33PM (#21317672)
IIRC somebody said during one of 2015 SIGGRAPH presentations when it was introduced that it's the fifth iteration if you count SPIR pre-1.0, 1.0, 1.1, and 1.2 preceding it. They may have been joking.

Of course, the V in Vulkan also stems from 5. Vulkan was originally going to be OpenGL 5. That plan changed, but they chose a name starting with V as a nod to that history.

Re:RLSL: a Rust to SPIR-V Compiler by gmueckl on Monday October 21, 2019 @08:44PM (#21319225)
I'm sure that the name is alsona nod to Mantle, the direct predecessor. I haven't seen the Mantle documentation, but rumor has ot that Vulkan 1.0 initially was little more than Mantle with renamed identifiers.
Re:RLSL: a Rust to SPIR-V Compiler by slavik81 on Monday October 21, 2019 @09:21PM (#21319449)
Yeah. There were a lot of reasons why it was a good name. This panel briefly discussed the naming process: https://youtu.be/0b3x5Tlh6g0?t=2m30s
Re:RLSL: a Rust to SPIR-V Compiler by pjmlp on Tuesday October 22, 2019 @02:49AM (#21320961)
After Khronos decided to catch up with what all other 3D APIs were doing from the start on their shader support, and how CUDA always worked.