Commit Graph

6 Commits (283fe216dcc8c9ee1c814b69e774fdec428bc1f0)

Author SHA1 Message Date
Chris Burel 0e885b8267 [Linux] Fix crash from accessing an invalid AZ::EnvironmentVariable
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>
4 years ago
santorac ecae08fa95 Made some improvements for debugging shader hot reload issues.
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>
4 years ago
Steve Pham 38261d0800
Shorten copyright headers by splitting into 2 lines (#2213)
* Updated all copyright headers to split the longer original copyright line into 2 shorter lines

Signed-off-by: Steve Pham <spham@amazon.com>
4 years ago
Steve Pham b4a2edec6a
Final update copyright headers to reference license files at the repo root (#1693)
* 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>
5 years ago
Steve Pham 70042fcdcd
O3DE Copyright Updates for Linux Foundation (#1504) 5 years ago
alexpete a10351f38d Initial commit 5 years ago