* Fix RHI/Subpass sample for Vulkan. The issue was that we were exectuing the sub-pass groups more than once when parallel encoding was used.
Signed-off-by: moudgils <moudgils@amazon.com>
* Added a minor comment
Signed-off-by: moudgils <moudgils@amazon.com>
* Minor perf improvement
Signed-off-by: moudgils <moudgils@amazon.com>
* Refactor Vulkan swapchain so it can recreate when error occurs
Signed-off-by: jiaweig <jiaweig@amazon.com>
* revert the workaround
Signed-off-by: jiaweig <jiaweig@amazon.com>
* Move semaphore. Revert some viewport changes.
Signed-off-by: jiaweig <jiaweig@amazon.com>
* Added comments. Moved recreation out of AcquireNewImage.
Signed-off-by: jiaweig <jiaweig@amazon.com>
* Disable partial Descriptor Set updates as Vk validation layer does not like that
Signed-off-by: moudgils <moudgils@amazon.com>
* Enable parallel encoding for Vulkan
Disable partial SRG updates for Vk as the validation layer did not like that. There is a way to just updat SRG constants but that will require more work
Fix a bunch of Vulkan validation errors (mostly the ones spammming each frame)
Signed-off-by: moudgils <moudgils@amazon.com>
* Minor feedback update
Signed-off-by: moudgils <moudgils@amazon.com>
* Added a stateless allocator which uses AZ_OS_MALLOC/AZ_OS_FREE to
allocate memory for objects in static memory.
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Updated the Maestro and LyShine Anim Nodes to use the
stateless_allocator for its static containers.
This prevents crashes in static de-init due to the SystemAllocator being
destroyed at that poitn
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Updated the EBus AllocatorType to use the EBusEnvironmentAllocator
Because the EBus Context resides in static memory, the SystemAllocator
lifetime is shorter than the EBus Context.
This results in shutdown crashes in monolithic builds due to all of the
gem modules being linked in as static libraries and the EBus context now
destructing at the point of the executable static de-init, instead of
the module de-init, where the SystemAllocator would still be around.
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Fixed an assortment of shutdown issues due to deleting objects after
AZ allocators are no longer available
Fixed the NameDictionary IsReady() function to not assert when the
dictionary when invoked after the environment variable it was stored in
was destroyed.
Updated the NameData destructor to check that the NameDictionary
IsReady() before attempting to remove itself from the dictionary
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Fixed NameDictionary destory workflow, to reset the EnvironmentVariable
instance
Updated the EnvironmentVariable instance to store the NameDictionary as a
value.
Added a rvalue reference `Set` function overload to the
EnvironmentVariable class to support move only types.
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Clang 6.0.0 build fixes
The C++17 std::launder feature isn't available in that compiler version
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
- Each resource type is tracked and updated separately
- Added caching ability for Raytracing srg to save ~2ms for a scene containing 100 x 50 vegetation patch
Signed-off-by: moudgils <moudgils@amazon.com>
This change is a preparation for moving the CPU profiler/visualization system from Atom into its own Gem by removing the dependency on local time tracking object AZ::RHI::CpuTimingStatistics
Full changes include:
- Removed all usage of AZ::RHI::CpuTimingStatistics
-- Replaced with pushing to AZ::Statistics::StatisticalProfilerProxy global instance
- Promoted VariableTimer from AZ::RHI to AZ::Debug
- Removed now unused CpuTimingStatistics.h
Signed-off-by: AMZN-ScottR 24445312+AMZN-ScottR@users.noreply.github.com
The Linux platform has multiple windowing systems. Support for xcb is
currently in progress, support for Wayland is planned in the future. The
way the current xcb support is included is by making some file with a
`_xcb` suffix, and placing `#if PAL_TRAIT_LINUX_WINDOW_MANAGER_XCB` around
most of that file's contents.
With this change, all of the code in AzFramework that uses xcb directly is
inside the `Platform/Common/Xcb` subdirectory. It greatly reduces the
amount of code in compile-time `#ifdef` checks for the chosen windowing
system. It also provides a logical place to include O3DE-specific xcb
C++ wrappers and interfaces, without polluting non-xcb related code.
Signed-off-by: Chris Burel <burelc@amazon.com>
- Removed all unnecessary includes to Atom CpuProfiler.h
- Added includes to AzCore Profiler.h where necessary
Signed-off-by: AMZN-ScottR 24445312+AMZN-ScottR@users.noreply.github.com
These are immediate dependencies, and include many circular dependencies, largely amongst the Atom gems, as indicated by cmake
Signed-off-by: AMZN-alexpete <26804013+AMZN-alexpete@users.noreply.github.com>
* Fix out-of-date swapchain when QT window is not activated.
Signed-off-by: jiaweig <jiaweig@amazon.com>
* Removed new code of the previous hack.
Signed-off-by: jiaweig <jiaweig@amazon.com>
- Added new interface type AZ::Debug::Profiler to externally register profiler systems
- Modified the Atom CPU profiler to register as an AzCore profiler
-- This allows full engine markers to be visualized in the associated ImGui tool
- Converted all AZ_ATOM_PROFILE_* macros to use AZ_PROFILE_* macros instead
Signed-off-by: AMZN-ScottR 24445312+AMZN-ScottR@users.noreply.github.com
* Fixed crash in Atom Vulkan RHI when physical device limits timestampComputeAndGraphics is false.
Signed-off-by: Dihara Wijetunga <Dihara.Wijetunga@imgtec.com>
* Revert "Fixed crash in Atom Vulkan RHI when physical device limits timestampComputeAndGraphics is false."
This reverts commit f2b7d4eb704ef13701cb66b6b5802cb4e5eb9632.
Signed-off-by: Dihara Wijetunga <Dihara.Wijetunga@imgtec.com>
* Moved ATOM Vulkan RHI Device::InitFeaturesAndLimits() after m_commandQueueContext is initialized.
Signed-off-by: Dihara Wijetunga <Dihara.Wijetunga@imgtec.com>
* Remove unused Vulkan ShaderDescriptor class.
Signed-off-by: bosnichd <bosnichd@amazon.com>
* Add missing dependency on Gem::Atom_RHI.Public
Signed-off-by: bosnichd <bosnichd@amazon.com>
* Revert changes made to Gems/Atom/RHI/Vulkan/Code/* in https://github.com/o3de/o3de/pull/4021, and instead just check a trait to determine whether the RHI Vulkan targets have been defined else where. Gems/Atom/RHI/Vulkan/Code/CMakeLists.txt maybe needs to be revisited at some point, but my changes are causing numerous issues on mac so this just restores the prior behavior for all platforms while also providing a mechanism for any platform to simply define exactly what Vulkan related targets it needs independently.
Signed-off-by: bosnichd <bosnichd@amazon.com>
* Miscellaneous fixes and PAL changes required for restricted platforms.
Signed-off-by: bosnichd <bosnichd@amazon.com>
* Rename O3DE::ProjectManager::ProjectUtils::ReplaceFile -> ReplaceProjectFile to prevent conflict with Windows ReplaceFile #define
Signed-off-by: bosnichd <bosnichd@amazon.com>
* Fix loading of PipelineLibraries from disk for DX12 backend.
Signed-off-by: moudgils <moudgils@amazon.com>
* Disabled Saving out PipelineLibraries (for DX12) if pix or Renderdoc is enabled.
Addressed some feedback
Signed-off-by: moudgils <moudgils@amazon.com>
* Fixed an issue withe loading PipelineLibraries and added a cleaner abstraction to not save empty libraries for dx12
Signed-off-by: moudgils <moudgils@amazon.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>
* Moved PlatformLimits to setreg. Removed Device PostInit. Some clean up.
Signed-off-by: jiaweig <jiaweig@amazon.com>
* Move setreg loading the PlatformLimitsDescriptor super class.
Signed-off-by: jiaweig <jiaweig@amazon.com>
* Apply same implementation for fake device used in unit tests
Signed-off-by: jiaweig <jiaweig@amazon.com>
* Add implementation for Null renderer. Swap order for register RHI interface in initialization.
Signed-off-by: jiaweig <jiaweig@amazon.com>
* Move back setreg from PlatfromLimitsDescriptor to Device, due to Linux dependency issue.
Signed-off-by: jiaweig <jiaweig@amazon.com>
* Changed the function to take in RHI backend name
Signed-off-by: jiaweig <jiaweig@amazon.com>
* Temporary fix for Linux/Vulkan/XCB where the swap chain is not ready to present until the resize is complete
* Fix invalid GUID from LinuxXcbConnectionManager
Signed-off-by: spham-amzn <spham@amazon.com>
- Add new Linux Trait to determine which display driver client API to use (only xcb supported for now)
- Add support for xcb connections (initial) for Linux/Vulkan
- Fix minor assertion caused by wrong use of sizeof
- Fix casing issue in a couple of material files (Linux is case sensitive)