4 ms·
Just to be clear, SPIR-V has no relation to RISC-V?
by rough-sea 7y ago
Just to be clear, SPIR-V has no relation to RISC-V?
- TazeTSchnitzel 7y agoThere is no relation.
- slavik81 7y agoNo 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.
- gmueckl 7y agoSPIR-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.
- phire 7y agoYep, 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.
- erichocean 7y ago> * SPIR-V is pretty close to being tokinized/SSAed GLSL* SPIR-V is in SSA form; GLSL most definitely is not.
- wtallis 7y agoI 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.
- slavik81 7y agoIIRC 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.
- gmueckl 7y agoI'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.
- slavik81 7y agoYeah. 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 https://youtu.be/0b3x5Tlh6g0?t=2m30s
- pjmlp 7y agoAfter 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.