ATOM-16273 Compiling SceneSRG before updating it can cause a gpu crash
Changes include:
1. Removed Scene::SetShaderResourceGroupCallback() function and clean up code which use this function.
2. Moved SceneTimeSrg.azsli to RPI's DefaultSceneSrg folder and setup the constants in RPI::Scene
3. Add AZ::Event for Scene's update srg event which features and update scene srg at proper place
4. UpdateTransformServcie FP to use PrepareSceneSrg event handler.
5. Clean up shaders and srgs used in project templates.
Signed-off-by: Qing Tao <qingtao@amazon.com>
Many of these are just extra noise in the profile, but the one in Archive.cpp could also cause PIX to crash.
Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
* Release build fix for Windows
* Release build fix for Android
* Release build fix for Windows
* Release build fix for Android
* Release build fix for Linux
* Release build fix for Mac
* Release build fix for iOS
Signed-off-by: Steve Pham <spham@amazon.com>
NOTE: The memory driller is still intact for now to avoid needing to
modify allocators, but the frame/cpu portions of driller and the
standalone executable are now gone.
Signed-off-by: Jeremy Ong <jcong@amazon.com>
Adds new instrumentation macros throughout the codebase, using the
visualizer to find where current instrumentation is lacking using the
shadowed sponza sample + editor. Some notes from exploring:
- We spend ~5ms in CullingScene: BeginCulling
- PipelineStateCache: Compact usually 1ms
- CompileImageBarriers takes most of the time in CompileResourceBarriers
Signed-off-by: Jacob Hilliard <jhlliar@amazon.com>
The DynamicDrawContext can output to different scopes: Scene, RenderPipeline or RasterPass.
Updated RasterPass so it can handle not only draw calls from Views but also from DynamicDrawContexts.
* ATOM-15939 Add support to capture attachment for ParentPass
- Moved the attachment read back support to Pass class so it supports both ParentPass and RenderPass.
- Added support to output input or output state of an InputOutput attachment.
- Enabled showing ParentPass attachments in PassTree tool.
Signed-off-by: Tao <qingtao@amazon.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>
* Enable 16 byte alignment for root constants
* Switching to R8G8B8A8_UINT for dummy stream buffers
* Clamping min values for scissor/viewport for fullscreen pass
* - Fix the second window related tabbing issue
- Merge calls to UseResoources acrooaa all the SRGs
- Move SamplerCache to the device to ensure only one cache to reduce duplication
- Fixes to compute threading numbers getting reset to 0,0,0
- Cleanup withing BufferPoolResolver
- Argument buffers are now queued to be cleaned up upon shutdown
Added a ShaderSystem supervariant to provide a system-wide supervariant name.
Changed ShaderAsset to append the system-wide supervariant name when searching for supervariants.
Added the NoMSAA supervariant to several shaders.
This was done while working on "ATOM-15728 Shader Hot Reload Fails in Debug Build", but it turned out these changes did not actually fix the issue (or any other known hot-reload issue). Still, these improvements are appropriate as they correct logical oversights.
ShaderVariant was not listening to asset reloads. It needs to know when the ShaderVariantAsset reload happens so it can reinitialize it's members as well as propagate reinitialization messages. I added a member for the ShaderAsset as the class needs this to reinitialize itself. So now the class listens for reloads of both the ShaderVariantAsset and the ShaderAsset.
Shader was not listening for ShaderAsset reinitialization events.
Updated the API for ShaderReloadNotificationBus's OnShaderVariantReinitialized to include the ShaderVariant which is the most relevant information (the other information wasn't really being used anyway).