The latter. SPIR-V is an intermediate language. By removing text parsing and AST building from the graphics driver it saves a little time, avoids the problem of inconsistencies across compilers and allows for non-target-specific optimizations by the off-line SPIR-V generators. The driver still has to lower the SPIR-V to the GPU instruction set which involves among other things register allocation. This work takes a far bigger portion of the time involved in a GLSL compilation than parsing the text. Not only that, SPIR-V data is typically larger than the original GLSL text. So SPIR-V is not necessarily a magic bullet. Regards
-Mark |
Attachment:
signature.asc
Description: Message signed with OpenPGP