Commit Graph

2914 Commits (development)

Author SHA1 Message Date
Tom Hulton-Harrop 6ffc2620e4
Updates to EMFX cameras and better support for character follow behavior (#7676)
* initial wip change to help resolve EMFX camera viewport issue

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>

* some updates to add/remove camera input API

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>

* add additional comments and remove some optimize off calls

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>

* improvements to camera behavior in EMFX editor

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>

* add some tests for add/remove logic for cameras

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
4 years ago
lumberyard-employee-dm 60adc098da
Fixed implicit conversion to bool in AZStd::to_string. (#7755)
This specifically implies to the value returning to_string overloads

Added a range based StringFunc::Join overload.

Reduced the number of AZStd::to_string calls in the TranslationKey
operator<< function.

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
4 years ago
Danilo Aimini b69ae11ec6
Editor | Refactor right-click context menu to improve grouping and surface most used items to the top. (#7742)
* Move "Open pinned Inspector" to separate handler to move it after the Prefab menu items.

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>

* Rearrange context menu items, add shortcuts

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>

* Fix pragma once in header

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>

* Revert casing changes that would cause issues in automated testing.

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
4 years ago
Tommy Walton 7de6bc5b23
Add RoundUpToMultiple and DivideAndRoundUp functions to MathUtils.h (#6989)
* Add RoundUpToMultiple and DivideAndRoundUp functions to MathUtils.h

Signed-off-by: Tommy Walton <waltont@amazon.com>

* Rename DivideByMultiple2 back to DivideByMultiple, now that I've confirmed it's not in use in the codebase. RHI::DivideByMultiple can be fully deprecated in favor of AZ::DivideAndRoundUp at a later date, once the deprecation strategy has been finalized.

Signed-off-by: Tommy Walton <waltont@amazon.com>

* Update based on PR feedback

Signed-off-by: Tommy Walton <waltont@amazon.com>

* Switched from std::numeric_limits to AZStd::numeric_limits and updated the header to indicate it works for non-power of two alignments, but that SizeAlignUp is more efficient if the alignment is a power of 2

Signed-off-by: Tommy Walton <waltont@amazon.com>

* Added missing arguments to the assert, and a missing namespace and include that failed to compile on non-unity builds

Signed-off-by: Tommy Walton <waltont@amazon.com>
4 years ago
lumberyard-employee-dm 669caca9cc
Updated Launching of Lua Editor to supply the project-path (#7706)
* Updated Launching of Lua Editor to supply the project-path

The Lua Launch logic also uses the AzFramework ProcessLauncher instead
of Qt. This has the benefit of being able to pass arguments as an array
instead of in a single string. Therefore paths with spaces in them also
work.

Tweak the Settings Registry logic to locate the
project-path/engine-path by scanning upwards for a
project.json/engine.json respectively to inject the found paths to the
front of the command line parameters instead of the back.
This has the effect of making sure that command line parameters for the
project-path/engine-path always takes precedence over scanning upwards
for a project.json/engine.json.

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Removed prepend of EngineRoot in CheckProjectPathProvided

The Editor would attempt to validate that the project path supplied via
the command line contained a valid project.json file before contining
the Editor startup flow.

This was taking the engine root path and appending the project path to
it, which works when the project path is absolute

But when the project path is relative it is treated as relative to the
current working directory by the SettingsRegistry, but the logic in the
CheckProjectPathProvided was treating it has relative to the engine
root. Therefore supplying a relative path as part of the Editor.exe
launch command would fail.

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Fixed resolving of relative paths to absolute paths in the Editor

The Editor was changing the current working directory to the nearest
ancestor directory containing an `engine.json` file.
This resulted in the ConvertToAbsolutePath function resolving relative
paths to that directory instead of the launch directory of the Editor.

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
4 years ago
Luis Sempé 44187d50ee
Merge pull request #7730 from aws-lumberyard-dev/scripting/script_events
Fixed Script Event registration going to the incorrect Behavior Context
4 years ago
Danilo Aimini 6fe2664b68
Focus Mode | Make Ctrl+S shortcut contextual to Prefab Focus (#7649)
* Change the Ctrl+S flow to save the currently focused prefab instead of the root.

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>

* Ensure the Outliner is refreshed on save

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>

* Rename ExecuteClosePrefabDialog to be more accurate (the function also does the saving, it's not just creating the dialog).

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>

* Minor changes to labeling.

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>

* Adjust labeling to reflect changes in behavior.

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>

* Revert labeling changes

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>

* Additional checks to guarantee the system works in test mode

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>

* Additional check to prevent crashes when the editor somehow triggers save during automated tests.

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>

* Simplify checks

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>

* Update preferences and dialog labels to reflect new behavior.

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
4 years ago
Danilo Aimini 322a6c495a
Focus Mode | Improvements to GetFocusedEntities (#7708)
* Ensure that the system works at startup and after Clear. Ensure the invalid entityId is not added to the list.

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>

* Return a const reference to the list of entities in FocusModeInterface

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>

* Fix SetFocusRoot to trigger notifications appropriately

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>

* Optimize the entity removal via swap and pop, since we don't care about the order.

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>

* Introduce additional check to prevent possibly adding the same entity to the list twice.

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>

* Fix mock after API changes

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>

* Typo.

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>

* Fixed logic that needed to be updated when the code was moved.

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
4 years ago
Scott Romero a20f48915e
[development] Profiler gem cleanup (#7533)
Consolidated the contents of CpuProfilerImp.h into CpuProfiler.h
Renamed CpuProfilerImpl.cpp to CpuProfiler.cpp
Collapsed the CpuProfilerImpl class into the intermediary CpuProfiler interface class, removing that interface type
Replaced all calls to the old CpuProfiler interface with AZ::Debug::ProfilerSystemInterface
Added accessor to see if a continuous capture is in progress to AZ::Debug::ProfilerRequests

Signed-off-by: AMZN-ScottR 24445312+AMZN-ScottR@users.noreply.github.com
4 years ago
Vincent Liu 2589cb20e5
Add required support for GameLift TLS certificate (#7564)
* Add required support for GameLift TLS certificate
* Update based on feedback
4 years ago
Chris Galvan 9618078784
Merge pull request #7724 from aws-lumberyard-dev/cgalvan/ImageGradientHandleUnsupportedFormat
Added error handling for unsupported pixel formats on an image gradient
4 years ago
lsemp3d 1ed513d782 Fixed Script Event registration going to the incorrect Behavior Context
Signed-off-by: lsemp3d <58790905+lsemp3d@users.noreply.github.com>
4 years ago
puvvadar 7dccb15fb7
Merge pull request #7609 from aws-lumberyard-dev/math_string_converters
[Impactful Change] Consolidate to_string implementations for math classes and add bool to_string
4 years ago
Chris Galvan 3207e909f7 Added error handling for unsupported pixel formats on an image gradient
Signed-off-by: Chris Galvan <chgalvan@amazon.com>
4 years ago
John Jones-Steele e57b854fca
Cleaned up issues with multiple components ? button (#6555)
* Cleaned up issues with multiple components ? button

Signed-off-by: John Jones-Steele <82226755+jjjoness@users.noreply.github.com>

* Commit for merge

Signed-off-by: John Jones-Steele <82226755+jjjoness@users.noreply.github.com>

* Commit before merge

Signed-off-by: John Jones-Steele <82226755+jjjoness@users.noreply.github.com>

* WIP

Signed-off-by: John Jones-Steele <82226755+jjjoness@users.noreply.github.com>

* Before merge from development

Signed-off-by: John Jones-Steele <82226755+jjjoness@users.noreply.github.com>

* Updated all HelpURL

Signed-off-by: John Jones-Steele <82226755+jjjoness@users.noreply.github.com>

* Changes from PR

Signed-off-by: John Jones-Steele <82226755+jjjoness@users.noreply.github.com>

* Changes from PR

Signed-off-by: John Jones-Steele <82226755+jjjoness@users.noreply.github.com>
4 years ago
puvvadar 781769b012 Clang format MathStringConversions.h
Signed-off-by: puvvadar <puvvadar@amazon.com>
4 years ago
Nicholas Van Sickle 26566a06d2
Merge pull request #7565 from aws-lumberyard-dev/nvsickle/DomPrefixTree
Add DomPrefixTree, a DOM path => value lookup structure
4 years ago
lumberyard-employee-dm ba48ef3949
GCC Build fix. (#7659)
GCC doesn't accept accessing member variables inside the noexcept expression of a member function.

GCC also requires that template specializations for an inner template be outside of all classes.

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
4 years ago
Chris Galvan c2d6ba0c69
Merge pull request #7625 from aws-lumberyard-dev/cgalvan/AddSupportForUNORM_SRGB
Added support for several UNORM_SRGB formats
4 years ago
Mike Balfour 0e328afcdd
Optimize surface providers (#7631)
* Add comparison operators to SurfaceTagWeight.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>

* Changed AddSurfaceTagWeight to always combine weights.
This simplifies the API a bit and defines the behavior if someone ever tries to add a duplicate tag.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>

* Added benchmarks for measuring the performance-critical APIs.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>

* Changed SurfaceTagWeights to a fixed_vector.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>

* Add inPosition to AddSurfacePoint.
This will be used to detect which input the surface point is associated with.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>

* Add inPositionIndex to the appropriate APIs.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>

* Switched Gradient Surface benchmarks to use actual surface components.
The gradient unit tests and benchmarks were previously using a mock surface data system, which led to misleading benchmark results. Now, the actual SurfaceData system gets constructed, and the tests use a mock provider, but the benchmarks use actual shape providers for more realistic benchmarking.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>

* Fixed unit tests to have better query ranges.
Half of each previous range was querying outside the surface provider's data.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>

* First attempt at removing SurfacePointLists.
This currently runs significantly slower than the previous code but passes the unit tests.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>

* Another attempt at optimization.
This one runs faster than the previous, but still slow.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>

* Fix the cmake dependency so that the gradient tests rebuild SurfaceData.dll when run.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>

* Switch SurfaceAltitudeGradient over to the new bulk API.
Also, optimized the non-bulk API by having it reuse the SurfacePointList to avoid the repeated allocation / deallocation cost.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>

* Switched to using an indirect index so that all allocations are consecutive in our reserved buffer.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>

* Switched back to SurfaceTagWeight again.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>

* Added runtime dependency to LmbrCentral for unit tests.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>

* Switched code over to use the full EnumeratePoints in most cases.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>

* Added knowledge of max surface point creation into the system.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>

* Add generic GetSurfacePointsFromList API implementation for surface providers.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>

* Fixed implementation to use the correct maximum number of input points based on the surface providers being queried.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>

* Fix out-of-bounds references on empty lists.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>

* Fix memory allocation that caused benchmark runs to crash.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>

* Starting to clean up the API.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>

* Move SurfacePointList into separate files for easier maintainability.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>

* Fixed bug where too many points were filtered out due to using the position Z as a part of the AABB check.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>

* Made FilterPoints an internal part of SurfacePointList so we can choose when and how to perform the filtering.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>

* Final cleanup / comments.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>

* Added includes for non-unity builds.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>

* Optimized GetValues() implementations.
Also consolidated GetValue() and GetValues() down to a single implementation under the covers for easier maintenance.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>

* Changed how unit tests initialize the mock lists to try and fix the linux errors.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>

* Switch to explicit span declarations to help ensure this works with linux.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>

* Fixed compile error.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>

* Make the bulk terrain APIs take in const Vector instead of non-const.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>

* Optimize the surface data providers for bulk queries.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
4 years ago
Nicholas Van Sickle de8b1496f0 Update DomPrefixTree range ctor with better validation
Signed-off-by: Nicholas Van Sickle <nvsickle@amazon.com>
4 years ago
Nicholas Van Sickle f60a24e07d Add support for Range-based DomPrefixTree construction, fix initializer_list
Signed-off-by: Nicholas Van Sickle <nvsickle@amazon.com>
4 years ago
Ronald Koppers f2378fc8d8
Merge pull request #7561 from aws-lumberyard-dev/ConfigurableStack
Improved the way the Settings Registry can handle stacks/arrays.
4 years ago
Nicholas Van Sickle e149abe550 Tidy a bit of API
Signed-off-by: Nicholas Van Sickle <nvsickle@amazon.com>
4 years ago
AMZN-koppersr f91ea8de13 Removed #pragma once in cpp file.
Signed-off-by: AMZN-koppersr <82230785+AMZN-koppersr@users.noreply.github.com>
4 years ago
Nicholas Van Sickle 5543a0d32d Fix non-unity builds again
Signed-off-by: Nicholas Van Sickle <nvsickle@amazon.com>
4 years ago
puvvadar a2d86a9fa4
Merge branch 'development' into math_string_converters 4 years ago
Mike Balfour 7fbcab9f13
gtest_repeat crashes (#7645)
* Moved allocation to avoid crash on gtest_repeat.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>

* Fixed GradientSignal tests to work with gtest_repeat.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
4 years ago
puvvadar 056b308854 Cleanup doxygen comments in MathStringConverters
Signed-off-by: puvvadar <puvvadar@amazon.com>
4 years ago
Nicholas Van Sickle f934984ffe Address review feedback:
- Use `unordred_map` (speed is about the same but providing a hash is slightly nicer than operator<)
- Do better arg forwarding where applicable
- Swap EXPECT_ test ordering

Signed-off-by: Nicholas Van Sickle <nvsickle@amazon.com>
4 years ago
AMZN-koppersr 9bd487e3bd Minor fixes to the configurable stack based on provided feedback.
Signed-off-by: AMZN-koppersr <82230785+AMZN-koppersr@users.noreply.github.com>
4 years ago
Danilo Aimini 1c72d799f1
Prefabs UI | Refactor PrefabIntegrationManager into a separate class for save/load dialog management. (#7630)
* Split up the save/load handling functions from PrefabIntegrationManager to improve maintainability.

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>

* Turn WarnUserOfError into a widely available utility function.

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>

* Consolidate the definitions for AzToolsFramework Entity classes (List, IdList, IdSet) to avoid multiple redefinitions across the module.

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>

* Fix usage of EntityIdList I missed in the tests.

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>

* Fix EntityList def in SliceConverter

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
4 years ago
Nicholas Van Sickle 0459aae295 Merge remote-tracking branch 'upstream/development' into nvsickle/DomPrefixTree 4 years ago
Chris Burel 28049f6321
Merge pull request #7633 from aws-lumberyard-dev/fixWindowsClangBuild
Fix windows clang build
4 years ago
lumberyard-employee-dm cf9825d37e
Mac Runtime Fix: Up the hard coded size for the HpAllocator buffer to 18KiB (#7634)
* Up the hard coded size for the HpAllocator buffer to 18KiB

Added a static assert in the HphaSchema.cpp file to validate that the
HpAllocator aligned storage buffer is at least the size of the
HpAllocator class.

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Removed comment blocks with username from HphaSchema.h

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
4 years ago
Chris Burel 377da0ed0c Ignore unused benchmark state variables
Signed-off-by: Chris Burel <burelc@amazon.com>
4 years ago
lumberyard-employee-dm 92cd457c25
MacOS build fix (#7627)
* MacOS build fix

Updated the HpAllocator::bucket to align upwards to the nearest power of
2.

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Adding static assets to validate teh AlignUpToPowerOfTwo function.

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
4 years ago
Chris Burel 0b317ee0f5
Merge pull request #7566 from aws-lumberyard-dev/fixClangWindowsBuild
Fix clang windows build
4 years ago
puvvadar 7a919f1d7d Merge branch 'math_string_converters' of https://github.com/aws-lumberyard-dev/o3de into math_string_converters 4 years ago
puvvadar e9378efffe Fix std namespace usages
Signed-off-by: puvvadar <puvvadar@amazon.com>
4 years ago
puvvadar 35406e27e1
Merge branch 'development' into math_string_converters 4 years ago
Danilo Aimini 31fb5322ed
Refactor the Outliner drag&drop and selection to fix UX and technical issues. (#7559)
* Prototype - refactor the selection system for the Outliner (WIP)

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>

* WIP - unify custom drag, still trying to find a way to make it so that the selection isn't affected by drag/drop of unselected entity

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>

* Wrap up changes

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>

* Minor refactor - move from enum to bool

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>

* Prevent clicks on the spacing column from selecting the entity; better refresh the hover state.

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>

* Fix weird flicker introduced by latest commit

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>

* Change color for the drag select rectangle.

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>

* Add more thorough comments, and also make some helper variables const.

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>

* Fixed incorrect variable types (Qt uses ints for on-screen dimensions)

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
4 years ago
Chris Galvan 8cf29ebc25 Added support for several UNORM_SRGB formats
Signed-off-by: Chris Galvan <chgalvan@amazon.com>
4 years ago
lumberyard-employee-dm 6f52fcb9f0
Various Benchmark Fixes for AzCore (#7611)
Fixed crash in Allocators Benchmark multithreaded test due to the HPHA schema not having proper multithread protection around the `mFreeTree` member in `tree_get_unused_memory` function.
The `mFreeTree intrusive set is able to modified on multiple threads.

Replaced the custom intrusive_list implementation n HPHA schema with AZStd::intrusive_list

Added a `ScopedAllocatorBenchmarkEnvironment` class to provide an RAI mechanism for initializing the SystemAllocator in Benchmark Test

Rermoved the `AzCoreBenchmarkEnvironment` in lieu of the `ScopedAllocatorBenchmarkEnvironment` class

Fixed assert when running Allocator Benchmarks in debug due to mismatch PauseTiming/ResumeTiming in Allocator Benchmark Fixtures

Added `ScopedRegisterBenchmarkEnvironment` RAII class to provide lifetime guarantees on BenchmarkEnvironments registered via the `AZ_UNIT_TEST_HOOK`

Initialized the intrusive_multiset_node members to nullptr in all build configurations instead of only debug as the cost negligible and it is useful for debugging.

fixes LYN-10210

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
4 years ago
Guthrie Adams 1b366fbad8
Merge pull request #7612 from aws-lumberyard-dev/Atom/guthadam/removing_thumbnail_context_from_thumbnail_system
Removing thumbnail context from thumbnail system
4 years ago
bosnichd d0e5f9d20b
Added Async APIs for the various Process*FromList/Region terrain functions. (#7480)
* Added Async APIs for the various Process*FromList terrain functions.

Please note that we are currently defaulting the number of worker threads to one, because splitting the work over multiple threads causes contention when locking various mutexes, resulting in slower overall wall time for async requests split over multiple threads vs one where all the work is done on a single thread. The latter is still preferable over a regular synchronous call because it is just as quick and prevents the main thread from blocking. This should be changed once the mutex contention issues have been addressed, so that async calls automatically split the work between available job manager worker threads, unless the ProcessAsyncParams specify a different desired number of jobs.

Signed-off-by: bosnichd <bosnichd@amazon.com>

* Fix Linux builds by adding missing #include

Signed-off-by: bosnichd <bosnichd@amazon.com>

* Added a test for cancellation of terrain async requests, and fix it so that it works.

Note that the benchmarks show this implementation to be slightly slower than the previous one, which I presume is because we're now calling a 'perSurfacePointFunction' in the inner loop; this can probably be addressed, but will result in a lot of code duplication, and I think efforts will be better spent on removing the mutex contention to enable running multiple terrain async jobs at the same time.

Signed-off-by: bosnichd <bosnichd@amazon.com>

* Added Async versions for all Process*Region terrain API functions, along with benchmarks.

Signed-off-by: bosnichd <bosnichd@amazon.com>

* Fix the newly added terrain async request benchmarks to actually use the async APIs.

Signed-off-by: bosnichd <bosnichd@amazon.com>

* Revert to the original version which just calls the synchronous API from the job function, along with some other updates in response to review feedback.

Signed-off-by: bosnichd <bosnichd@amazon.com>

* Change the TerrainWorldDebugger to use the async API, along with the following changes:
- TerrainJobContext no longer uses a JobCancelGroup so we can guarantee the completion callbacks of associated jobs will be invoked even if it is cancelled.
- As a result of the above change, the ProcessAsyncCompleteCallback function signature again accepts the associated TerrainJobContext as a param.
- The TerrainProcessAsyncCancellation test has been resurrected and simplified by using binary semaphores instead of condition variables.
- All the async related TerrainSystemBenchmark functions have been simplified by using binary semaphores instead of condition variables.
- Global cancellation of all terrain jobs on deactivation of the TerrainSystem has been reintroduced, but in a different way than before.
- Other miscellaneous changes/fixes made while testing and based on earlier PR feedback.

Signed-off-by: bosnichd <bosnichd@amazon.com>

* Updates based on review feedback:
- Go back to using a vector instead of an array (fixed the original problem by adding custom copy/assignment constructors/operators to the WireframeSector struct).
- When calling WireframeSector::Reset, block until any associated in flight has completed.
- Added the concept of a minimum number of positions per terrain job.

Signed-off-by: bosnichd <bosnichd@amazon.com>

* Use semaphore instead of binary_semaphore in a bunch of places to account for the race condition where a completion callback fires before we started waiting for it.

Signed-off-by: bosnichd <bosnichd@amazon.com>
4 years ago
Tom Hulton-Harrop deeb59cb83
Allow SurfaceManipulator to self-intersect when holding Ctrl (#6453)
* beginning updates to surface manipulator intersect

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>

* initial changes to support surface manipulator being able to ignore custom entity ids

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>

* updates to use type aliases

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>

* add test for self-intersection test for SurfaceManipulator when holding Ctrl

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
4 years ago
greerdv 645dde9da0
Merge pull request #7463 from aws-lumberyard-dev/box-manipulators-nus
Fixing various bugs with collider and box shape manipulators with non-uniform scale
4 years ago
Guthrie Adams 7996591182 Removing thumbnail context from thumbnail system
This work has been on hold for a while. Revisiting removal of thumbnail contexts now while debugging related lockups exiting tools from script. Thumbnail contexts are an unused layer of indirection that makes debugging the system more difficult. All systems were only referencing the default context.

Signed-off-by: Guthrie Adams <guthadam@amazon.com>
4 years ago
puvvadar e481f6bfcf Fix math string unit test failures
Signed-off-by: puvvadar <puvvadar@amazon.com>
4 years ago