rt: fix shader reloading validation crashes

wait for gpu to become idle before trying to recreate pipelines
This commit is contained in:
Ivan 'provod' Avdeev 2022-08-12 12:32:52 -07:00 committed by Ivan Avdeev
parent c53f22d028
commit 188d02c4aa
1 changed files with 1 additions and 0 deletions

View File

@ -668,6 +668,7 @@ void VK_RayFrameEnd(const vk_ray_frame_render_args_t* args)
if (g_rtx.reload_pipeline) {
gEngine.Con_Printf(S_WARN "Reloading RTX shaders/pipelines\n");
XVK_CHECK(vkDeviceWaitIdle(vk_core.device));
reloadPass( &g_rtx.pass.primary_ray, R_VkRayPrimaryPassCreate());
reloadPass( &g_rtx.pass.light_direct_poly, R_VkRayLightDirectPolyPassCreate());