radv: copy stages instead of serializing NIR for GPL with the RETAIN flag
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 7 Apr 2023 12:20:15 +0000 (14:20 +0200)
committerMarge Bot <emma+marge@anholt.net>
Fri, 7 Apr 2023 19:43:05 +0000 (19:43 +0000)
commit79655e2ea831e2a9e4f9d0847597fc26a0d195b1
treedc9c8562ab198b491ab7a26a0b2dbfd77edb181f
parentedb198e0b12ed45b81a607cb3f92fd12078c8cdb
radv: copy stages instead of serializing NIR for GPL with the RETAIN flag

When the driver gets a cache hit for the binary, we still have to
retain shaders because we can't know if the LTO pipeline will be a
cache hit as well.

Though, serializing the NIR is too costly and most of the libraries
took more than 10ms to be created, which isn't acceptable. To fix this,
keep track of the shaders stage info for libs with the RETAIN flag.

This might be replaced by NIR caching later if it's worth a try.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22327>
src/amd/vulkan/radv_pipeline.c
src/amd/vulkan/radv_private.h