Commit Graph

10712 Commits

Author SHA1 Message Date
lumberyard-employee-dm 098005afbc AZStd::basic_string improvements (#6438)
* AZStd::basic_string improvements

The AZStd::basic_string class has a better implementation of the Short
String Optimization, which increases the amount of characters that can
be stored in a `basic_string<char>` from 15 characters to 22
characters(not-including null-terminating characters). For a
`basic_string<wchar_t>` on Windows the amount of characters that can be
stored increases from 7 to 10. Using `basic_string<wchar_t>` on Unix
platforms SSO character amount from 3 to 4 characters.

An additional benefit is that the size of the AZStd::basic_string class
has been reduced from 40 bytes to 32 bytes when using the
AZStd::allocator.
When using a stateless allocator with no non static data members such as
AZStd::stateless_allocator, the size of the AZStd::basic_string is 24
bytes.

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

* Corrected comments and updated type alias to usings for AZStd::basic_string

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

* Added Benchmarks for the basic_string and basic_fixed_string class

The benchmarks currently measure the speed of the `assign` overloads.
A benchmark has also been added to compare the speed swapping two
`basic_string` instances by 3 memcpy vs 3 pointer swap operations

Speed up string operation when in the iterator overload cases of the
`assign`, `append`, `insert` and `replace` function.
The code was always performing the logic to copy over a string that is
overlapping, without actually checking if the string was overlapping in
the first place.

Added an `az_builtin_is_constant_evaluated` macro that allows use of the
C++20 `std::is_constant_evaluated` feature to determine if an operation
is being performed at compile time vs run time.

That macro is being used to speed up the char_trait operations at run
time, by using the faster standard library functions.
For example char_traits::move now uses "memmove" at runtime, instead of
a for loop.

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

* Simplified string logic in AWSMetricsServiceApiTest.

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
2022-01-10 10:03:31 -06:00
John Jones-Steele 7c88f20e1e Spinboxes now correct when rounding. (#6748)
* Spinboxes now correct when rounding.

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>

* Fixed tests after change to rounding in spinbox

Signed-off-by: John Jones-Steele <82226755+jjjoness@users.noreply.github.com>
2022-01-10 11:49:22 +00:00
Benjamin Jillich afc531d4c3 Fixes VS2022 error C5233: explicit lambda capture 'isSlash' is not used (#6745)
Signed-off-by: Benjamin Jillich <jillich@amazon.com>
2022-01-10 10:22:02 +01:00
moraaar 57e4fb9b39 Fixed script canvas component asset not being found (#6727)
Script canvas component has the member m_sourceData (that points to the script canvas asset) that internally has data, id and path. Path is serialized as the absolute path of the pc that is saving the level.

So when another pc loads the same level it cannot find the script canvas asset.

The function CompleteDescription takes a look at the id and takes the path from the asset catalog, but at the moment it's doing an early return because id and path are not empty (but path is the value serialized from other user saving the level).

By removing the early return condition then it it will resolve by using id, looking into the catalog and getting the real path.

This fix makes several physics automated tests that relied on script canvas to work.

Signed-off-by: moraaar moraaar@amazon.com
2022-01-10 09:05:35 +00:00
Chris Galvan 5e8c1aab29 Merge pull request #6756 from aws-lumberyard-dev/cgalvan/RemovedMoreUnusedEditorCodeAndImages
Removed more unused Editor code and images
2022-01-07 16:39:19 -06:00
michabr b04cecc34d Move Draw2d interface back to IDraw2d (#6730)
* Move Draw2d interface back to IDraw2d

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

* Fix compile error for gems using LyShine

Signed-off-by: abrmich <abrmich@amazon.com>
2022-01-07 14:28:38 -08:00
Chris Galvan 641f7be041 Removed more unused Editor code and images
Signed-off-by: Chris Galvan <chgalvan@amazon.com>
2022-01-07 14:24:53 -06:00
Junbo Liang 67a89c6cd0 Fix an issue where npm is not found (#6706)
Signed-off-by: Junbo Liang <68558268+junbo75@users.noreply.github.com>
2022-01-07 10:51:08 -08:00
Mike Balfour 7123ed18be Naive GetValues() implementation. (#6741)
* Naive GetValues() implementation.
Added the method itself, and the benchmarks which show that even the naive version is currently 10-50% faster than calling GetValue() for multiple values.

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

* Added comments documenting why the const_cast is there.

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

* Fixed link errors by creating new Shared.Tests lib.

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

* Addressed PR feedback.

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

* Fixed incorrect comparison.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
2022-01-07 12:12:09 -06:00
Michael Pollind 8503915cdd bugfix: correct mouseMove under AzToolsFrameworkHelper (#6493)
* bugfix: correct mouseMove under AzToolsFrameworkHelper

REF: https://github.com/o3de/o3de/issues/6481
Signed-off-by: Michael Pollind <mpollind@gmail.com>

* chore: added unit test

Signed-off-by: Michael Pollind <mpollind@gmail.com>

* chore: address comments

Signed-off-by: Michael Pollind <mpollind@gmail.com>

* chore: correct fixture

Signed-off-by: Michael Pollind <mpollind@gmail.com>

* chore: tweak mouse move logic

Signed-off-by: Michael Pollind <mpollind@gmail.com>

* updates to track mouse/cursor position via events instead of using QCursor::pos()

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

* rename AzToolFrameworkTestHelperTest.cpp to AzToolsFrameworkTestHelpersTest.cpp

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

Co-authored-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
2022-01-07 14:43:34 +00:00
AMZN-Igarri 042ed3b877 AssetBrowser SearchFilteringTest: Added delay when inserting a string to the search file. (#6036)
* Added delay when inserting a string to the search file.

Signed-off-by: AMZN-Igarri <82394219+AMZN-Igarri@users.noreply.github.com>

* Added explanatory comment

Signed-off-by: AMZN-Igarri <82394219+AMZN-Igarri@users.noreply.github.com>
2022-01-07 12:29:32 +00:00
Jeremy Ong 2c41a73c12 Merge pull request #6740 from aws-lumberyard-dev/Atom/FixDepthIssues
Add missing `precise` attribute to depth prepass output
2022-01-07 04:33:42 -07:00
Tom Hulton-Harrop 1a8b7aeb48 Small workaround and fix to ensure line fade (alpha) displays correctly (#6733)
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
2022-01-07 09:37:33 +00:00
sphrose 98b0f206a0 Merge pull request #6705 from aws-lumberyard-dev/3495_preferences_panel_update
3495 Preferences panel update: fix richtext elision and allow html links
2022-01-07 08:52:45 +00:00
Ken Pruiksma 9cb7d05e6b Adding a temporarily exclusion for terrain gem materials and shaders when building on mac (#6739)
* Adding a temporarily exclusion for terrain gem materials and shaders when building on mac. This is a short term fix until either:
- there's a generic way to exclude assets based on platform
- materialtype assets can directly exclude certain platforms (or ignore excluded shaders)
- shader compiling for mac supports unbounded texture arrays.

Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>

* moving setreg to gem and contraining to the exact files that are problematic

Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
2022-01-06 22:50:16 -06:00
Mikhail Naumov 8668fac564 Fixing character controller triggering collision on creation (#6546)
* Fixing character controller triggering collision on creation

Signed-off-by: Mikhail Naumov <mnaumov@amazon.com>

* PR feedback

Signed-off-by: Mikhail Naumov <mnaumov@amazon.com>
2022-01-06 17:09:27 -08:00
Mike Chang 6a171d1769 Windows installer build tag date fix (#6735)
Makes the % string replacement optional in the palSh function

Signed-off-by: Mike Chang <changml@amazon.com>
2022-01-06 16:41:35 -08:00
carlitosan 7f4fe67f77 Fix issues caused by SC editor component holding onto a live graph (#6734)
Signed-off-by: carlitosan <82187351+carlitosan@users.noreply.github.com>
2022-01-06 16:35:36 -08:00
Esteban Papp 54e0b8b7b5 Enabling mac tests (#6716)
* Adds mac test job

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* Points to sysctl properly to handle zsh

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* Fixes some macos differences with Linux when reading the CTEST_RUN_FLAGS parameters

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* adding the test job to the profile pipe

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* Disables some tests in Mac that are not passing

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* passes config to cli_test_driver and sets the right trait for the test (pytest instead of lytesttools)

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* Set proper traits for AtomRHI

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* Corrected AZ_TRAIT_UNIT_TEST_PERLINE_GRADIANT_GOLDEN_VALUES_7878 values for Mac

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* Disables EMotionFX tests in Mac

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* Removes debugging prints

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* Removes filters that were meant just for Linux

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* quotes are re-quoted in the test_mac.sh script

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
2022-01-06 16:16:48 -08:00
Jeremy Ong 39edcd06e4 Add missing precise attribute to depth prepass output
Commit 67689d48cc enforced precision in
many vertex position outputs. This adds the attribute to the output of
the z-prepass, needed to ensure proper depth testing in the forward
passes.

Signed-off-by: Jeremy Ong <jcong@amazon.com>
2022-01-06 16:51:40 -07:00
dmcdiarmid-ly a365e15729 Merge pull request #6717 from aws-lumberyard-dev/Atom/dmcdiar/ATOM-16989
Improved DiffuseProbeGrid blending
2022-01-06 16:30:21 -07:00
Ronald Koppers f376d7e379 Merge pull request #6468 from aws-lumberyard-dev/Prefabs/ProcessStackAddPrefabBug
Spawnable Entity Alias improvements
2022-01-06 14:58:27 -08:00
Vincent Liu ad9bcba6e2 [Linux] Update to use AWSNativeSDK 1.9.50 (#6715) 2022-01-06 13:17:48 -08:00
Chris Galvan d47f282ec1 Merge pull request #6726 from aws-lumberyard-dev/cgalvan/RemovedLegacyDatabaseLibrary
Removed legacy editor DatabaseLibrary code.
2022-01-06 15:15:18 -06:00
Esteban Papp 741a9059f6 More packaging cleanup (#6728)
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
2022-01-06 12:13:23 -08:00
dmcdiarmid-ly f7ea1258a3 Merge pull request #6713 from aws-lumberyard-dev/Atom/semaster/convert_shadowtest_level
Move and convert ShadowTest level and include object files
2022-01-06 13:07:34 -07:00
Chris Galvan d3b36f1814 Added a couple more missing includes
Signed-off-by: Chris Galvan <chgalvan@amazon.com>
2022-01-06 13:55:52 -06:00
Chris Galvan 53e6f0f99f Added another missing include
Signed-off-by: Chris Galvan <chgalvan@amazon.com>
2022-01-06 13:27:44 -06:00
AMZN-koppersr 603967d61f Fixed build issues with Spawnable Entity Aliases.
Signed-off-by: AMZN-koppersr <82230785+AMZN-koppersr@users.noreply.github.com>
2022-01-06 11:04:54 -08:00
Chris Galvan e5c2d574fc Added a missing include and forward declare
Signed-off-by: Chris Galvan <chgalvan@amazon.com>
2022-01-06 12:51:10 -06:00
Allen Jackson 353d4bb2bb {lyn8938} looks into the asset database to detect products (#6709)
Signed-off-by: Allen Jackson <23512001+jackalbe@users.noreply.github.com>
2022-01-06 11:47:04 -06:00
Chris Galvan fee88cf5c6 Removed legacy editor DatabaseLibrary code.
Signed-off-by: Chris Galvan <chgalvan@amazon.com>
2022-01-06 10:12:54 -06:00
Mike Balfour 14661af13f Terrain/mbalfour/misc bugfixes (#6712)
* Bumped up terrain world limit to allow up to (and including) 4096 x 4096.

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

* Changed loop calculations to handle floating-point math better.
By looping on floating-point values, query resolutions of unstable values like "0.200000007" would sometimes cause the loop to go one more time than it should.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
2022-01-06 09:19:42 -06:00
sphrose 030ba4853b Merge branch 'development' into 3495_preferences_panel_update 2022-01-06 14:29:04 +00:00
Tom Hulton-Harrop 66985e3569 Updates to ViewportTitleDlg to better expose grid snapping visualization (#6700)
* updates to ViewportTitleDlg to better expose grid snapping visualization

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

* small typo fix

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

* add escape handling for widget to be more consistent with other QMenu behavior

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

* remove unneeded [[maybe_unused]]

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
2022-01-06 09:26:16 +00:00
dmcdiarmid-ly 23293a13c1 Improved DiffuseProbeGrid blending around the edges of the volume
Signed-off-by: dmcdiarmid-ly <63674186+dmcdiarmid-ly@users.noreply.github.com>
2022-01-05 21:51:42 -07:00
carlitosan da0a10bb4c fix for edit SC action in entity context menu (#6686)
* on demand reflect az events when they are the return value of ebuses

Signed-off-by: carlitosan <82187351+carlitosan@users.noreply.github.com>

* fix crash and functionality for edit sc editor context menu action

Signed-off-by: carlitosan <82187351+carlitosan@users.noreply.github.com>
2022-01-05 19:04:55 -08:00
AMZN-koppersr e2a960e442 Fixed a sync issue when a PrefaDOM was taken from a PrefabDocument.
When a PrefabDOM was taken from a PrefabDocument the Instance would continue to have the data from the original Prefab, which means they'd no longer be in sync as the Prefab would be empty. This was fixed by resetting the Instance so they're both clear.

Signed-off-by: AMZN-koppersr <82230785+AMZN-koppersr@users.noreply.github.com>
2022-01-05 17:21:15 -08: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
Sean Masterson ee6709a85c Move and convert ShadowTest level and include object files
Signed-off-by: Sean Masterson <semaster@amazon.com>
2022-01-05 15:47:11 -08:00
michabr 01c5fb7817 Add clamp mode to Draw2d (#6630)
Signed-off-by: abrmich <abrmich@amazon.com>
2022-01-05 15:27:52 -08:00
Allen Jackson 6c3d5c434e {lyn8865} Adding DataTypes::ScriptProcessorFallbackLogic (#6396)
* {lyn8865} Adding DataTypes::ScriptProcessorFallbackLogic

- Give the user an option how to handle fallback logic for script rules

Signed-off-by: Allen Jackson <23512001+jackalbe@users.noreply.github.com>

* the new code found an error in a Python script... it seems to work!

Signed-off-by: Allen Jackson <23512001+jackalbe@users.noreply.github.com>

* fixing up the regression test

Signed-off-by: Jackson <23512001+jackalbe@users.noreply.github.com>

* dump version number

Signed-off-by: Allen Jackson <23512001+jackalbe@users.noreply.github.com>
2022-01-05 16:08:58 -06:00
Chris Galvan 8a271cabb3 Merge pull request #6708 from aws-lumberyard-dev/cgalvan/RemoveMoreUnusedEditorCode
Removed unused Editor code from EditMode/Geometry/Include/LightmapCompiler
2022-01-05 15:27:07 -06:00
Roman 55fb63da48 Debug render aabb now include node, mesh and static aabb. (#6685)
Signed-off-by: rhhong <rhhong@amazon.com>
2022-01-05 12:54:41 -08:00
Chris Galvan 233349ffe3 Removed unused Editor code from EditMode/Geometry/Include/LightmapCompiler
Signed-off-by: Chris Galvan <chgalvan@amazon.com>
2022-01-05 13:35:09 -06:00
AMZN-koppersr 13375cd7d9 Merge branch 'development' into Prefabs/ProcessStackAddPrefabBug 2022-01-05 11:12:57 -08:00
AMZN-koppersr 31e51f8c3a Minor updates to the Spawnable Entity Aliases in response to PR feedback.
Signed-off-by: AMZN-koppersr <82230785+AMZN-koppersr@users.noreply.github.com>
2022-01-05 10:47:23 -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
sphrose 783a04b880 3495 Preferences panel update: fix richtext elision and allow html links
Signed-off-by: sphrose <82213493+sphrose@users.noreply.github.com>
2022-01-05 18:00:07 +00:00
Shirang Jia 1d0cd46cb7 Escape % for windows batch in palSh (#6688)
Signed-off-by: Shirang Jia <shiranj@amazon.com>
2022-01-05 09:54:52 -08:00