During asset processing, no `RPISystem` component is created, so nothing
so nothing calls `ShaderSystem::Init()`, so nothing calls
`ShaderReloadDebugTracker::Init()`. Consequently, the
AZ::EnvironmentVariables that are used during
`ShaderReloadDebugTracker::IsEnabled()` never got created, causing a read
from a nullptr at runtime. This fixes that issue by making `IsEnabled()`
call `CreateVariable()` on the variables it needs if they are not valid.
In addition, it changes the call to `CreateVariable()` to initialize the
variable's values directly, to ensure they are only initialized once. It
also switches to use `AZ::Crc32` so that the variable's id is computed at
compile time.
Signed-off-by: Chris Burel <burelc@amazon.com>
Made ShaderReloadDebugTracker store its static data in Environment system variables, so they are shared across dlls. This fixes issues with inconsistent indenting when debug operations are performed in different libraries.
New ShaderReloadDebugTracker operations in FullscreenTrianglePass.
Added a ShaderReloadDebugTracker message to Shader::GetVariant that includes asset built timestamp infromation, which I think will be really helpful in sorting out reload issues.
Renamed some functions and variables to remove a redundant "ShaderAsset" term.
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
* Final update copyright headers to reference license files at the repo root
Signed-off-by: spham <spham@amazon.com>
* Fix copyright validator unit tests to support the stale O3DE header scenario
Signed-off-by: spham <spham@amazon.com>