nemerle
3cac520280
Fix non-unity windows build
...
Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com >
2022-01-11 00:47:00 +01:00
nemerle
f1f81c3789
Merge remote-tracking branch 'upstream/development' into compiletime_filerequest_code2
2022-01-08 21:25:48 +01:00
Esteban Papp
09fd52ef73
AzCore Math tests produce errors that need to be disabled in debug ( #6678 )
...
* Tests produce errors that need to be disabled in debug
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com >
* PR suggestion
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com >
2022-01-05 16:07:52 -08:00
Esteban Papp
89067fe667
Memory/benchmarks ( #5896 )
...
* initial version ported from an old implementation
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com >
* simplification of code
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com >
* Fixes a recursive loop
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com >
* Removing commented code of different options for getting memory usage of a process
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com >
* PR comment (NULL->nullptr)
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com >
* Adds mulit-threaded tests
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com >
* Improving runtime and making the whole duration manageable
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com >
* Fixes Linux build
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com >
* Fixes for mac
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com >
* Fixes for HeapSchema to get a default block if none is passed
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com >
* Adds recording functionality (disabled) and a benchmark that can run recordings
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com >
* Removes Heap allocator from being possible to use as a SystemAllocator since it doesnt allow dynamic allocating (only works with pre-allocated blocks)
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com >
* WIP trying to use SystemAllocator instead of raw reads
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com >
* Makes the recorded benchmark more stable
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com >
* More stability changes, improvement on type usage within the benchmark, cleanup of unstable stats
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com >
* Adds benchmark files for Android
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com >
* Fixes Linux nounity build
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com >
* PR comments
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com >
* Death test relies on an exception from ocurring, that exception is an access violation, which could not happen (i.e. the memory could be valid for the process)
The test didnt have to be a death test. Also handled the situation better in the code to be able to continue in that scenario (useful for release configurations)"
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com >
2022-01-05 10:40:03 -08:00
Esteban Papp
c548fd7682
Death test relies on an exception from ocurring, that exception is an access violation, which could not happen (i.e. the memory could be valid for the process) ( #6683 )
...
The test didnt have to be a death test. Also handled the situation better in the code to be able to continue in that scenario (useful for release configurations)"
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com >
2022-01-05 08:15:08 -08:00
Benjamin Jillich
79dd65e1cc
Quaternion shortest equivalent ( #6472 )
...
* Added new helper functions to get the shortest equivalent of the rotation. In case the w component of the quaternion is negative the rotation is > 180° and taking the longer path. The quaternion will be inverted in that case to take the shortest path of rotation.
* Added unit test.
* Renamed the angle parameter of the CreateRotationX/Y/Z() functions into angleInRadians.
Signed-off-by: Benjamin Jillich <jillich@amazon.com >
2022-01-03 10:20:27 +01:00
Chris Galvan
24a3014e06
Merge pull request #6318 from aws-lumberyard-dev/PathSerializationSupport
...
Introduced a Json Serializer for the AzCore mutable path classes
2021-12-27 13:16:39 -06:00
Jeremy Ong
5b76d47e17
Remove time tests that relied on main-thread sleeps
...
Sleeping in tests and attempting to rely on fine-grained measurements to
check code validity is intrinsically brittle. Wall-clock time is
unreliable in an environment where tests are run under a hypervisor that
may choose to suspend your VM at any point, or in situations where the
OS cannot schedule your thread in time. The correct way to reintroduce
these tests in the future is provide an override for the timestamp
queries that can be injected in the test environment to control the wall
time deterministically.
Signed-off-by: Jeremy Ong <jcong@amazon.com >
2021-12-23 17:15:49 -07:00
Mike Balfour
1845eba6ee
Fixed compile error.
...
Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com >
2021-12-20 16:33:36 -06:00
Mike Balfour
a07534ea51
Merge commit '7e5115114ca9500abf67095acb71fbb6087d06c8' into mbalfour/gitflow_211220_stabilization_2111RTE
2021-12-20 14:43:13 -06:00
amzn-sean
fea4d0e6b1
adding TimeSystem unit tests ( #6446 )
...
Signed-off-by: amzn-sean <75276488+amzn-sean@users.noreply.github.com >
2021-12-20 14:32:25 +00:00
Nemerle
d8e06d9d95
Apply reviewer suggestions
...
Signed-off-by: Nemerle <nemerle5+git@gmail.com >
2021-12-17 16:02:33 +01:00
Benjamin Jillich
d20aa935ba
Quaternion to scaled-axis angle representation (and back) helpers ( #6421 )
...
Direct conversion helpers for quaternion to the scaled axis-angle representation and back without the need to convert them first to the axis-angle format and manually scale (or normalize on the way back). This also avoids having to deal with the special case of an identity representation which is 0,0,0 in the scaled axis-angle format while our convention for axis-angle is 0,1,0 for the axis and 0 for the angle.
Added unit tests that check the conversion round-trips from quaternion -> (scaled) axis-angle -> quaternion as well as comparing the scaled axis-angle representations from the direct helper functions as well as the axis-angle while manually scaling/normalizing.
Signed-off-by: Benjamin Jillich <jillich@amazon.com >
2021-12-17 09:43:35 +01:00
lumberyard-employee-dm
dc9d1a2f31
Introduced a Json Serializer for the AzCore mutable path classes
...
Added UnitTest for Json Serialization of AzCore Path types
resolves #2477
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com >
2021-12-14 23:34:00 -06:00
Nicholas Van Sickle
f71b134a84
Ensure JsonSerializer::StoreTypeName stores the correct type for generic types
...
Signed-off-by: Nicholas Van Sickle <nvsickle@amazon.com >
2021-12-13 23:40:35 -08:00
nemerle
5ff65be314
This reduces non-unity build time by ~2% and build size by ~0.5%.
...
This PR is a 'clean' version of #6199 updated to latest development
Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com >
2021-12-12 23:48:47 +01:00
Artur K
53b88d4752
Preapre codebase for FileRequest compiletime improvements ( #6192 )
...
* Preapre codebase for FileRequest compiletime improvements
This is preparing grounds for the next PR that will contain the 'meat'
of the changes.
Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com >
* Remove spurious newline.
Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com >
2021-12-10 13:08:24 +00:00
Esteban Papp
5cca52e73c
Merge branch 'development' into redcode/driller_removal
...
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com >
# Conflicts:
# Code/Framework/AzCore/AzCore/azcore_files.cmake
# Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/15_red_sRGB.tif
2021-12-07 13:31:55 -08:00
Esteban Papp
cd5306febf
Merging from development
...
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com >
2021-12-07 12:35:41 -08:00
Nicholas Van Sickle
3d8664ee92
Merge pull request #5511 from aws-lumberyard-dev/nvsickle/GenericDomJson
...
Generic DOM: Add DomBackend abstraction and JSON support
2021-12-07 11:20:53 -08:00
Nicholas Van Sickle
6cf805256b
Make backend write API string-based
...
Signed-off-by: Nicholas Van Sickle <nvsickle@amazon.com >
2021-12-06 15:55:35 -08:00
Steve Pham
be252d797d
Remove disabled failed asset load tests trait from linux ( #6100 )
...
* Remove trait AZ_TRAIT_DISABLE_FAILED_ASSET_LOAD_TESTS for Linux
Signed-off-by: Steve Pham <82231385+spham-amzn@users.noreply.github.com >
2021-12-06 09:11:56 -08:00
Nicholas Van Sickle
8165f54c05
Use temporary lifetimes for test
...
Signed-off-by: Nicholas Van Sickle <nvsickle@amazon.com >
2021-12-03 13:52:16 -08:00
Nicholas Van Sickle
4dbce4275b
Refactor the interface after some chatting with @amazon-employee-dm
...
Signed-off-by: Nicholas Van Sickle <nvsickle@amazon.com >
2021-12-02 17:46:07 -08:00
Esteban Papp
498673ada0
Removes Driller from AzCore
...
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com >
2021-12-02 17:15:46 -08:00
Esteban Papp
de06bb75e5
Fixes some unit tests due to the removal of the MemoryDriller
...
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com >
2021-12-02 12:41:32 -08:00
Esteban Papp
19ddeeded9
Removes ThreadDrillerEvents, replaces handlers with TreadEventBus
...
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com >
2021-12-02 12:40:39 -08:00
Esteban Papp
1b01ec18b0
Replaces handlers of TraceMessageDrillerBus with handlers of TraceMessageBus
...
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com >
2021-12-02 10:09:39 -08:00
Esteban Papp
c3f035c4e3
Removes AssetMemoryAnalyzer that relies on the MemoryDrillerBus
...
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com >
2021-12-01 19:08:12 -08:00
Esteban Papp
95ed1015a5
Removes the MemoryDriller
...
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com >
2021-12-01 18:48:07 -08:00
Esteban Papp
3f6246ccbe
Removes recording of memory records through the MemoryDriller
...
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com >
2021-12-01 18:21:39 -08:00
Esteban Papp
47de333e94
Removes m_enableDrilling
...
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com >
2021-12-01 16:50:45 -08:00
amzn-mike
828431f185
Update AssetManager unit tests to not interact with the disk ( #5815 )
...
* Changed AssetManager tests to use memory streams for asset reading/writing
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com >
* Fix compilation on non-unity builds
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com >
* Fixed handling of path lookups when test folder path is non-empty
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com >
* Add more detailed error message for "asset is not loaded"
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com >
* Make numThreads a constexpr
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com >
* Add FindFile function
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com >
* Remove unused lambda capture
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com >
* Remove trailing whitespace
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com >
* Add size to assert
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com >
2021-12-01 09:05:35 -06:00
Nicholas Van Sickle
a9c05372d5
API tweaks
...
- Use ref types
- Support using rapidjson::Value in lieu of rapidjson::Document
- Use the existing JSON comparison util function in tests
Signed-off-by: Nicholas Van Sickle <nvsickle@amazon.com >
2021-11-30 18:00:59 -08:00
Nicholas Van Sickle
5dbe9e387b
Address some review feedback, remove DomBackendRegistry
...
Signed-off-by: Nicholas Van Sickle <nvsickle@amazon.com >
2021-11-30 12:10:16 -08:00
lumberyard-employee-dm
879012b1ae
Added the --regset-file option for setreg file loading ( #5768 )
...
The SettingsRegistryMergeUtils.cpp now supports specifying a path to a JSON Merge Patch formated settings registry file via the --regset-file option.
The option supports specify an anchor key to merge the settings underneath that is separated from the filepath via "::"
Ex. `--regset-file="Registry/custom.setreg::/Custom/Anchor"`
An AZ::Console command of "sr_regset-file" has also been added to allow merging of a setting registry file as well.
closes #5767
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com >
2021-11-30 13:03:46 -06:00
lumberyard-employee-dm
ca94e58399
Added SerializeContext Reflection of FixedMaxPath class ( #4453 )
...
* Added SerializeContext Reflection of FixedMaxPath class
Added UnitTest for validating path clas reflection
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com >
* Updated the paths loaded during the serialization to use test path
separator
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com >
2021-11-29 13:50:39 -06:00
Nicholas Van Sickle
5e4bdac2e1
Merge remote-tracking branch 'upstream/development' into nvsickle/GenericDomJson
2021-11-29 09:40:56 -08:00
amzn-sean
b882eddca8
fix dev break. AZStd::fixed_vector cannot be constexp error ( #5995 )
...
Signed-off-by: amzn-sean <75276488+amzn-sean@users.noreply.github.com >
2021-11-29 14:05:03 +00:00
lumberyard-employee-dm
97106f9e60
Adding missing C++20 std::erase implementations ( #5735 )
...
There were already implementations for std::erase_if.
This adds the counterpart AZStd::erase versions
resolves #5734
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com >
2021-11-26 11:31:13 -06:00
Tom Hulton-Harrop
5bd751531d
Update return type for viewport screen functions ( #5803 )
...
* update return type for viewport screen functions
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com >
* add tests for AZ::Matrix3x4::CreateFromMatrix4x4 and add TransformPoint to Matrix3x4
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com >
* update NDC -> Ndc
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com >
* updates following review feedback
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com >
* updates and improvements following PR feedback
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com >
* add forward declaration of Matrix3x4 type
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com >
* update where forward declarations are defined for Matrix3x4
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com >
2021-11-24 09:17:43 +00:00
AMZN-koppersr
389f29f0e7
Performance improvement for fixed_vector
...
AZStd::fixed_vector had all its functions marked with constexpr, but this requires all member variables to be fully initialized. This meant that the internal array used to store elements always has to be fully initialized. This was done for trivial classes but not for non-trivial classes. As a result trivial classes always did a memset (or more optimized versions for smaller buffers) while the non-trivial version couldn't actually be stored in a constexpr variable. Since AZStd::fixed_vector is meant to be dynamic the choice was made to remove the constexpr from all non-static member functions in favor of avoiding the overhead of memset, which profiling showed was a considerable overhead depending on the reserved size. If a truly constexpr array is needed than AZStd::array is a better choice as that's designed to not by dynamic.
Signed-off-by: AMZN-koppersr <82230785+AMZN-koppersr@users.noreply.github.com >
2021-11-23 09:26:37 -08:00
amzn-mike
af85060856
[SPEC-7644] Cherry Pick - ParallelDeepAssetReferences is failing intermittently ( #5797 )
...
* [SPEC-7644] ParallelDeepAssetReferences is failing intermittently (#5721 )
* Fixed race condition caused by trying to handle asset ready event before asset container has finished filling out all the data structures.
Added check to only handle asset ready once init is complete
Added unit test to verify fix
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com >
* Re-enable test
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com >
* Add missing space to error message
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com >
* Add comment on sleep
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com >
* Collapse nested namespace
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com >
* Collapse nested namespace
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com >
(cherry picked from commit 56900484fc )
# Conflicts:
# Code/Framework/AzCore/AzCore/Asset/AssetContainer.cpp
* Fix indentation
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com >
2021-11-19 11:22:43 -08:00
amzn-mike
56900484fc
[SPEC-7644] ParallelDeepAssetReferences is failing intermittently ( #5721 )
...
* Fixed race condition caused by trying to handle asset ready event before asset container has finished filling out all the data structures.
Added check to only handle asset ready once init is complete
Added unit test to verify fix
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com >
* Re-enable test
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com >
* Add missing space to error message
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com >
* Add comment on sleep
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com >
* Collapse nested namespace
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com >
* Collapse nested namespace
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com >
2021-11-18 14:56:26 -08:00
amzn-mike
4b37e742d3
Add interface to allow disabling global AZ Core test environment trace bus suppression ( #5594 )
...
* Add interface to allow disabling global AZ Core test environment trace bus suppression
Update BaseAssetManagerTest class to disable the suppression by default
Update specific asset manager tests that rely on the trace bus suppression to ReEnable it
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com >
* Remove nodiscard
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com >
* Remove unique_ptr for disable token
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com >
* Fix move operator
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com >
* Switch to having individual flags for suppression of each type of output
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com >
* Add cvar to force stacktrace output.
Clean up whitespace
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com >
2021-11-17 14:40:48 -08:00
amzn-mike
8b7e538dd3
Cherry Pick: [LYN-7463] Fix insert streaming request failure ( #5604 ) ( #5622 )
...
* Fix race condition where asset would finish loading and another request would start before the streamer request could be cleared
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com >
* Re-enable disabled test which was failing for the same reason.
Fix test timeout which was way too long.
Reduce test iterations to keep test time safely under 5 seconds.
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com >
* Instead of using a mutex, re-order the statements to remove the streamer request first
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com >
(cherry picked from commit 0cea59d669 )
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com >
2021-11-15 14:14:43 -08:00
amzn-mike
0cea59d669
[LYN-7463] Fix insert streaming request failure ( #5604 )
...
* Fix race condition where asset would finish loading and another request would start before the streamer request could be cleared
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com >
* Re-enable disabled test which was failing for the same reason.
Fix test timeout which was way too long.
Reduce test iterations to keep test time safely under 5 seconds.
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com >
* Instead of using a mutex, re-order the statements to remove the streamer request first
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com >
2021-11-15 11:28:06 -08:00
amzn-sean
38a03817bb
Removal and Replacement of the CryTimer (gEnv->pTimer) ( #5409 )
...
Replaced and removed the CryTimer (gEnv->pTimer). The new TimeSystem is a merger of the current time functionality found in the engine.
* Rename TimeSystemComponent.h/.cpp to TimeSystem.h/.cpp
* Adding New TimeSystem
* remove old timer cvars
* small improvements to the time system.
- updated parts to use the time conversion functions.
- in AdvanceTickDeltaTimes applying t_simulationTickScale is now uses doubles instead of floats.
* Replace gEnv->pTimer / ITimer usages with TimeSystem
* Updating usages of AZ::TimeMs{ 0 } and AZ::TimeUs{ 0 } to AZ::Time::ZeroTimeMs and AZ::Time::ZeroTimeUs
* red code the CryTimer
* using TimeUs instead of TimeMs is some cases + updating usages of old cvars to new
Signed-off-by: amzn-sean <75276488+amzn-sean@users.noreply.github.com >
2021-11-15 12:11:58 +00:00
Nicholas Van Sickle
2c2c1d8137
Merge pull request #5562 from aws-lumberyard-dev/nvsickle/StabToDevNov21
...
Merge `stabilization/2110` as of `fac3d0b1bf` into `development`
2021-11-11 15:04:18 -08:00
bosnichd
19acf94606
Remove the legacy ViewSystem and some other tangentially related legacy code. ( #5558 )
...
Signed-off-by: bosnichd <bosnichd@amazon.com >
2021-11-11 13:29:51 -07:00