You Compiled This, Driver – Trust Me
joshbarczak.com
joshbarczak.com
We (the team that writes the Intel driver in Mesa) would love to be involved in things like that and would be happy to answer questions where possible -- #intel-gfx on Freenode or mesa-dev@lists.freedesktop.org.
The documentation doesn't contain much if anything in the way of performance data like instruction latency, so we've implemented similar methods to what the author used to measure the number of cycles a piece of code takes (environment variable INTEL_DEBUG=shader_time). We'd likely even learn something about the hardware ourselves by being involved in experiments like these.
Future of computing right here.
Not having to deal with legacy stuff in instruction decode is one of the big advantages GPUs have over CPUs, and it relies on having the driver do the compilation.
All that said, it's nice that people are having fun with AMD's and Intel's GPU ISA, but honestly, why on Earth do they do it on Windows? There are perfectly fine open source drivers available on Linux that you can easily modify to play around with the ISAs as much as you wish.
- Debugging tools available
- SDKs for game consoles
- Advanced CAD/CAM (not everything is on UNIX)
- Platform of choice for PC demoscene
(Yes, this (presumably) doesn't apply if you're using the open source drivers on Linux and accepting whatever tradeoffs apply there.)
This is a very useful path for applications that wish to remain portable by shipping pure GLSL source shaders, yet would like to avoid the cost of compiling their shaders at runtime.
As far as Vulkan, this is not the same use case. Vulkan is using the DX model of compile high level to intermediate representation, and then let driver compile to maybe. One idea of SPIR-V is that any compiler can generate the bytecode, whereas on DX, it currently is that only fxc is allowed to (this didn't used to be the requirement...I speculate it changed when the IL started to drift away from HW ISA , making it so that targeting IL was a bad idea).
As far as GetProgramBinary on Vulkan, that doesn't jive with how it's supposed to work. DX12/Vulkan have precompiled pipeline state objects that include compiled shader binaries as part of the state. Ideally, you build (and serialize) these at installation/startup so you don't have to worry about those during runtime.