Get the binary from a shader



Let’s assume that I have a compute shader that I want to run it using Vulkan. First I have to generate the .spv from the compute shader and then load the .spv on my application, bind it to a compute pipeline etc etc… My question is that the binary that runs on my GPU is produced from .spv file but is there any way to retrieve that binary ? Because the process goes like .comp -> .spv -> load to application -> ???(magic) -> runs on GPU.

Thanks in advance,


Yes, sort of, there is VkPipelineCache and vkGetPipelineCacheData.