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.Public
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
..
Buffer ATOM-15658 Better option of CreateCommonBuffer requires unique buffer name (#1133) 5 years ago
ColorManagement Initial commit 5 years ago
DynamicDraw Reenable LyShine mask support now using Atom (#1218) 5 years ago
GpuQuery ATOM-15780 Improve cpu profiler allows pause and output profiling data to a file for reference (#1358) 5 years ago
Image Integrate from 1.0 to main: LYN-3436 AutomatedTesting.GameLauncher crashes at launch if assets are not all processed (#612) 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 Added new shader reinitialization signaling. 5 years ago
Shader Fixed ATOM-14613 Baseviewer MatertialHotReloadTest fails to change the color after turning blending on and off 5 years ago
AuxGeomFeatureProcessorInterface.cpp Initial commit 5 years ago
Culling.cpp Changed the occlusion culling plane model to be on the XZ plane and adjusted the corner point computations 5 years ago
FeatureProcessor.cpp Initial commit 5 years ago
FeatureProcessorFactory.cpp Initial commit 5 years ago
MeshDrawPacket.cpp Addressed review comments. 5 years ago
PipelineState.cpp Added new shader reinitialization signaling. 5 years ago
RPISystem.cpp ATOM-15780 Improve cpu profiler allows pause and output profiling data to a file for reference (#1358) 5 years ago
RPIUtils.cpp Initial commit 5 years ago
RenderPipeline.cpp Pass changes: fixed reflection probe bake 5 years ago
Scene.cpp ATOM-15780 Improve cpu profiler allows pause and output profiling data to a file for reference (#1358) 5 years ago
View.cpp Temporal anti-aliasing and constrast adaptive sharpening (#1161) 5 years ago
ViewportContext.cpp Restore Editor viewport icon rendering (#879) 5 years ago
ViewportContextManager.cpp Fix ImGui rendering in-Editor 5 years ago
WindowContext.cpp Initial commit 5 years ago