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
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 SPEC-7178 Removal of precompiled cpp files (#1171) 5 years ago
Bootstrap Merge branch 'main' of https://github.com/aws-lumberyard/o3de into ly-as-sdk/LYN-2948-phistere 5 years ago
Component Adding back gem.json files to the Atom and AtomLyIntegration folders 5 years ago
Feature ATOM-15780 Improve cpu profiler allows pause and output profiling data to a file for reference (#1358) 5 years ago
RHI ATOM-15780 Improve cpu profiler allows pause and output profiling data to a file for reference (#1358) 5 years ago
RPI Fixed ATOM-14613 Baseviewer MatertialHotReloadTest fails to change the color after turning blending on and off 5 years ago
TestData ATOM-15295 Remove Unnecessary Enable Material Properties 5 years ago
Tools Adding PAL implementation for Linux 5 years ago
Utils ATOM-15780 Improve cpu profiler allows pause and output profiling data to a file for reference (#1358) 5 years ago
CMakeLists.txt Initial commit 5 years ago
gem.json Adding back gem.json files to the Atom and AtomLyIntegration folders 5 years ago