You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
o3de/Gems/Atom/RPI/Code/Source/RPI.Reflect
Chris Santora b176697ce9 Fixed ATOM-14613 Baseviewer MatertialHotReloadTest fails to change the color after turning blending on and off
The problem was...
After a MaterialAsset reload, there could be two different versions of the MaterialAsset in memory: the old one and the reloaded one. The old one is still connected to buses and can send reinitialization messages when other things reload or reinitialize. So when the shader asset reloaded, both the old and new MaterialAsset were sending reinitialization messages. Material::OnMaterialAssetReinitialized was using the materialAsset parameter to initialize the Material, and the latest call to OnMaterialAssetReinitialized was for the *old* MaterialAsset.

The solution is to use the m_materialAsset member when reinitializing the Material. I also added checks in a couple places to skip unnecessary reinitialization, and added comments in the bus headers to warn developers about this issue.

Testing: Added a new step to ASV's MaterialHotReloadTest.bv.lua script for the error scenario, and this now passes. Ran ASV full test suite, both dx12 and vulkan, only known issues occurred.
5 years ago
..
Asset Add newlines to the end of all files 5 years ago
Buffer ATOM-15658 Better option of CreateCommonBuffer requires unique buffer name (#1133) 5 years ago
Image Add newlines to the end of all files 5 years ago
Material Fixed ATOM-14613 Baseviewer MatertialHotReloadTest fails to change the color after turning blending on and off 5 years ago
Model ensure brute force ray intersection works (#1170) 5 years ago
Pass Integrating up through commit 90f050496 5 years ago
Shader Fixed an issue where vulkan shaders didn't work in AtomSampleViewer because the correct API data wasn't being selected. 5 years ago
System Initial commit 5 years ago
Base.cpp ATOM-15252 [Atom 0.8.5] Track View capture crashes when scene contains certain postfx 5 years ago
FeatureProcessorDescriptor.cpp Initial commit 5 years ago
GpuQuerySystemDescriptor.cpp Initial commit 5 years ago
RPISystemDescriptor.cpp Initial commit 5 years ago
ResourcePoolAsset.cpp Initial commit 5 years ago
ResourcePoolAssetCreator.cpp Add newlines to the end of all files 5 years ago