radv: Upload shaders to invisible VRAM on small BAR systems.
Following PAL's implementation, this patch avoids allocating shader code buffers in BAR and use SDMA to upload them to invisible VRAM directly. For some games like HZD, shaders can take as much as 400MB, which exceeds the non-resizable BAR size (256MB) and cause inconsistent spilling behavior. The kernel will normally move these to invisible VRAM on its own, but there are a few cases that it does not reliably happen. This patch does the moving explicitly in the driver to ensure predictable results. In this patch, we upload the shaders synchronously; so the shader will be ready as soon as vkCreate*Pipeline returns. A following patch will make this asynchronous and don't block until we see a use of the pipeline. As a side effect, when SQTT is used we now store the shaders on a cacheable buffer which would speed up writing the trace to the disk. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16271>
This commit is contained in:

committed by
Marge Bot

parent
3b258ae2d9
commit
a8c5fd3b1b
@@ -100,6 +100,7 @@ static const struct debug_control radv_perftest_options[] = {
|
||||
{"gpl", RADV_PERFTEST_GPL},
|
||||
{"ngg_streamout", RADV_PERFTEST_NGG_STREAMOUT},
|
||||
{"video_decode", RADV_PERFTEST_VIDEO_DECODE},
|
||||
{"dmashaders", RADV_PERFTEST_DMA_SHADERS},
|
||||
{NULL, 0}};
|
||||
|
||||
const char *
|
||||
|
Reference in New Issue
Block a user