From 1097cb7ce386c0c331f61060402fa9091695f64d Mon Sep 17 00:00:00 2001 From: galibzon <66021303+galibzon@users.noreply.github.com> Date: Wed, 16 Jun 2021 20:56:39 -0500 Subject: [PATCH] [ATOM-14935] MaterialHotReloadTest Fails On Second Try (#1384) [ATOM-14544] Add Reset() function to IShaderVariantFinder ShaderVariantAsyncLoader::Reset() now Shutdown and Init(). It clears the cache of ShaderVariantAssets it keeps in memory. Signed-off-by: garrieta --- .../Source/RPI.Public/Shader/ShaderVariantAsyncLoader.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/Shader/ShaderVariantAsyncLoader.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/Shader/ShaderVariantAsyncLoader.cpp index 3fc2bbd197..24f6fa60fa 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/Shader/ShaderVariantAsyncLoader.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/Shader/ShaderVariantAsyncLoader.cpp @@ -323,9 +323,8 @@ namespace AZ void ShaderVariantAsyncLoader::Reset() { - // [GFX TODO ATOM-14544] Idealy we want to be able to reset the ShaderVariantAsyncLoader but this is causing some problems that need to be worked out first. - //Shutdown(); - //Init(); + Shutdown(); + Init(); } ///////////////////////////////////////////////////////////////////