Commit Graph

83 Commits (5a60cb15fc018ad3d4102ada557bee835687e6cf)

Author SHA1 Message Date
Aaron Ruiz Mora f770e4aa7a
Unifying operators in Matrix3x3, Matrix3x4 and Matrix4x4
- Add operators +, -, * and / too all matrix classes
- Add RetrieveScaleSq and GetReciprocalScaled to all matrix classes
- Add unit tests to all matrix classes
- Fix a bug that causes release configuration not to compile.
5 years ago
Mike Balfour 31746705eb
Merge pull request #541 from aws-lumberyard-dev/mbalfour/lyn-3464
[LYN-3464] Vegetation unit tests intermittently failed due to AssetManager bug
5 years ago
mbalfour 53a6e5ac6b Addressed feedback. 5 years ago
mbalfour 5df82caef6 [LYN-3464] Vegetation unit tests intermittently failed due to an AssetManager bug. Inside the AssetContainer, if the root asset finished loading during the container initialization, the CheckReady() call at the end of initialization would detect the loaded asset, but would skip sending out notifications because the initialized flag wasn't set yet. This would lead to an extra asset reference remaining in the AssetManager itself, would would then cause errors when the asset handler for that asset got removed.
By setting the initialization flag before the CheckReady() call, the notifications get sent correctly, and no extra asset references remain.  This checkin also includes a unit test for the AssetManager that specifically forces this condition to happen and validates that it works correctly.
5 years ago
Aaron Ruiz Mora 70bd3ea0ff
Performance pass to Cloth CPU Skinning
- Added operator+(Matrix3x4), operator*(float), RetrieveScaleSq and GetReciprocalScaled to Matrix3x4. Used by Cloth CPU Linear Skinning. These operation will be performant as they use SIMD.
- Modified so there are no virtual functions calls at vertex level.
- Caching indices to simplify the loop when applying skinning.
- Caching static variables Matrix3x4 zero and DualQuaternion zero to avoid creating it for every vertex.
- Removing branching to skip joints when the weight is zero, these cases are rarely and this improves performance by removing branching from loops at vertex level.
- Changing skinning influences so it's a continuous block of memory.
- Caching the vector size() if a variable instead of directly using it in a for loop.
5 years ago
Chris Burel 31885753cb
Fixes for compile failures with Clang on Windows (#532)
* Fix compile errors when building with Clang.

* Fix for clang-based unity builds
5 years ago
mbalfour 2cfb7d536e [LYN-3411] Editor freezes when saving/reloading slice due to deadlock between main thread which is blocked waiting on a loading asset, and the loading thread, which is blocked on a mutex held by the main thread.
The specific mutex is "m_assetMutex" in the AssetManager.  AssetManager::ReloadAssetFromData was holding this lock while calling AssignAssetData, which goes on to call OnAssetReloaded.  This is dangerous, because any arbitrary logic can be executed during that call, including blocking asset loads, which is what happens in this specific deadlock case.  The fix is to move the call to AssignAssetData outside of the mutex lock.  AssignAssetData itself already grabs the assetMutex to protect the parts of its logic that are necessary, and then specifically releases the lock before calling OnAssetReloaded, so this change shouldn't introduce any dangerous threading conditions.

(cherry picked from commit 1581a28339f12d521955edef890acfb678a0df6f)
5 years ago
luissemp f5a9aaff5b Removed temporary debugging test 5 years ago
luissemp 13cf0be08a Restored the code that clears the Lua asset cache 5 years ago
Eric Phister fbdd26bbbc
Merge pull request #410 from aws-lumberyard-dev/ly-sdk/phistere/LYN-2723-Merge
LYN-2723: Fixes issues with bad project or engine paths

Cherry-pick: 6ce7a6d30c57c941459b43c157861df5d9143ae1
5 years ago
lumberyard-employee-dm 3dec5d3b71
LYN-2537 engine assets (#254)
* LYN-2537 Moved the Engine and Editor folder to be within the EngineAssets folder

* Fixed Documentation in bootstrap.cfg to correct the path to the user project specific registry file

* Adding a newline to the output of AssetCatalog 'Registering asset..., but type is not set' message

* Updating the AssetProcessorPlatformConfig.setreg Scan Folder to detect
the @ENGINEROOT@/EngineAssets/Engine path for engine runtime assets and
@ENGINEROOT@/EngineAssets/Editor path for engine tool assets

* Updating references to Icons and other assets to account for moving the
Engine and Editor folder under a single EngineAssets folder

* Moving the Engine Settings Registry folder from Engine/Registry -> Registry

* Removed the LY_PROJECT_CMAKE_PATH define as it is not portable to other locations. It is hard coded to the project location that was used for the CMake configuration. Furthermore it paths with backslashes within it are treated as escape characters and not a path separator

* Updated the LyTestTools asset_processor.py script to copy the exclude.filetag from the EngineAssets/Engine directory now

* Fixed Atom Shader Preprocessing when running using an External Project

* Updated the TSGenerateAction.cpp to fix the build error with using a renamed variable

* Updated the Install_Common.cmake ly_setup_others function to install the
EngineAssets directory and the each of the Gem's Assets directory while
maintaining the relative directory structure to the Engine Root
Also updated the install step to install the Registry folder at the
engine root

* Fixed the copying of the Registry folder to be in the install root, instead of under a second 'Registry' folder

* Moving the AssetProcessorPlatformConfig.setreg file over to the Registry folder

* Updated the LyTestTools and C++ code to point that the new location of
the AssetProcessorPlatformConfig.setreg file inside of the Registry
folder

* Renamed Test AssetProcessor*Config.ini files to have the .setreg extension

* Converted the AssetProcessor test setreg files from ini format to json
format using the SerializeContextTools convert-ini command

* Updated the AssetProcessor CMakeLists.txt to copy over the test setreg files to the build folder

* Updated the assetprocessor test file list to point at the renamed AsssetProcessor*Config setreg filenames

* Removed the Output Prefix code from the AssetProcessor. The complexity that it brought to the AP code is not needed, as users can replicate the behavior by just moving there assets underneath a another folder, underneath the scan folder

* Adding back support to read the AssetProcessorPlatformConfig.setreg file from the asset root. This is only needed for C++ UnitTests as they run in an environment where the accessing the Engine Settings Registry is not available

* Updating the Install_common.cmake logic to copy any "Assets" folder to
the install layout.
The Script has also been updated to copy over the "Assets" folder in the
Engine Root to the install layout instead of an "EngineAssets" folder

* Updating References to EngineAssets source asset folder in code to be the Assets source folder

* Moved the Engine Source Asset folder of 'EngineAssets' to a new folder name of 'Assets'. This is inline with the naming scheme we use for Gem asset folders

* Adding the EngineFinder.cmake to the AutomatedTesting project to allow it to work in a project centric manner

* Updating the LyTestTools copy_assets_to_project function to be able to copy assets with folders to the temporary project root
Fixed an issue in LyTestTools where the temporary log directory could have shutil.rmtree being called twice on it leading to an exception which fails an automated test

Updated the asset_procesor_gui_tests_2 AddScanFolder test to not use the
output prefix, but instead place the source asset root into a
subdirectory

* Correct the AssetProcessorPlatformConfig Scan Folders for the EngineAssets directory to point at the Assets directory

* Updated the asset procesor batch dependency test scan folder to point at the 'Assets' folder instead of 'EngineAssets'
5 years ago
Eric Phister 7dd7e82d86 LYN-2723: Fixes issues with bad project or engine paths (#369)
* Setup NativeUIRequests as an AZ::Interface.  Adds a NativeUISystemComponent to AzFramework Application.

* Renames NativeUISystemComponent (class) to NativeUISystem, since it's no longer a Component.

* Minor update to SettingsRegistryInterface::Remove doc-comments for accuracy.

* Fixes to make an early fatal shutdown of Editor occur without crash.

* LYN-2723: Updates startup to handle errors: engine root is empty, no valid project.json found (mismatched engine name), or bad project path (launch project picker dialog).

* LYN-2723: Minor formatting/spelling edits.

* LYN-2723: Moves ParseCommandLine from ComponentApplication to SettingsRegistryMergeUtils so it can be used in more places.

* Misc fixes. 'wait_for_connect' setting wasn't being properly applied to AP connection settings. Fix infinite loop in CCmdLine::Next.

* LYN-2723: Addresses review feedback.

* LYN-2723: Reverts some changes that caused a unit test to fail.

* LYN-2723: Reverts one more change that was unnecessary.
5 years ago
AMZN-koppersr b4976ff9cb
Merge pull request #327 from aws-lumberyard-dev/JsonSerializationTypeIdBug
Typeid bug fix in Json Serialization.
5 years ago
AMZN-koppersr 2dfe9942f2 Merge branch 'main' into JsonSerializationTypeIdBug 5 years ago
hultonha d36a9470a3 Merge branch 'main' into hultonha_PR-37_follow-up 5 years ago
mnaumov 5f33337fec Merge main 5 years ago
AMZN-koppersr 0f8e6cbda1 Fixed a Linux build error. 5 years ago
mnaumov 91f027a05c PR feedback 5 years ago
AMZN-koppersr 6dfa33816b Fixed a bug with type ids for inherited classes with a custom serializer.
The code that adds a $type field for pointers where needed was still assuming that custom serializer were always for primitives, which isn't the case anymore. This changes updates the behavior to allow $type to be added to those as well as long as they use an object. This does now however rely more heavily on earlier checks that the data needs a $type because it otherwise can't tell the difference between a primitive getting a default value (an empty object). In the original code this situation would have resulted in failed serialization though, so it's unlikely to be a problem.
5 years ago
hultonha fbaa59f28f updates following review feedback 5 years ago
Chris Burel 61fe298319
Merge pull request #197 from aws-lumberyard-dev/filesEndInNewlines
Add newlines to the end of all files
5 years ago
Chris Burel 28170ffe41 Add newlines to the end of all files 5 years ago
amzn-mike d25179303d Add jira ticket for disabled tests 5 years ago
amzn-mike c61b244416 Use a const to toggle asset cancellation on and off 5 years ago
amzn-mike 9e2836613f Merge branch 'main' into amzn-mike/lyn-2249-disable-cancel 5 years ago
amzn-mike 58e8233c2c Remove debug message 5 years ago
amzn-mike 0428189bed Increase test difficulty 5 years ago
amzn-mike 39789c30d8 Remove container OnAssetCanceled event 5 years ago
amzn-mike 35a47932eb Disable weak references and unit tests for them. 5 years ago
Terry Michaels d680995074
Renamed several non-inclusive terms (#236) 5 years ago
greerdv 1fa5728655
Merge pull request #69 from aws-lumberyard-dev/non-uniform-scale-mesh
support for non-uniform scale component with atom mesh component
5 years ago
amzn-mike 3907ffc173 Add unit test 5 years ago
mbalfour bd23944531 Fix issues with rapid asset cancellation / reload:
* Asset<T>::QueueLoad didn't trigger any loads in the case where an asset was in a Queued state, it simply returned the reference.  This caused problems in the case where an asset was in the process of being cancelled and garbage collected, as it could be in a queued state with nothing actively loading it.  The method now detects this case and calls GetAsset(), which triggers a new load.
* AssetContainer::IsValid() was returning true for canceled containers that no longer had a root asset.  Now it returns false, to help ensure the container doesn't try to get reused.
* AssetContainer would add entries to the preloadList even if any potential preloads were filtered out from the load.  They are no longer added, since they shouldn't be waiting for any dependent assets to load.  (This could cause incorrect warnings to print in some situations)
* AssetContainer was erroneously warning about removing assets from a missing waiting list.  The warning was removed, as the condition could occur when the same asset was being loading by two different containers - once with dependencies and once without.
* AssetDataStream::RequestCancel has been added, as it was missing, but nothing currently needs to use it.
* AssetManager::GetAssetContainer() now verifies that the container is valid before attempting to reuse it.  This prevents asset containers that are in the middle of cancellation from getting reused.
5 years ago
AMZN-AlexOteiza dbcb2f9916
Added sys_assert level 3 which will make asserts to crash the application(#208)
Co-authored-by: aljanru <aljanru@amazon.com>
5 years ago
greerdv 62a3b7635b Merge branch 'main' into non-uniform-scale-mesh 5 years ago
SJ 3df1ffe3b7
3rd Party static libraries need to be public dependencies to work from installed engine.
Merge pull request #168 from aws-lumberyard-dev/LYN-2588
5 years ago
amzn-sj f53c1e8084 3rd Party static libraries need to be public dependencies to work from installed engine. 5 years ago
mbalfour d9fe89ba56 Addressed feedback - made string& into a string_view. 5 years ago
greerdv 12cbba5fad adding test for Aabb::MultiplyByScale 5 years ago
mbalfour e8459898a7 Exposed Quaternion::CreateFromEulerAnglesDegrees and Transform::Transform(Vector3, Quaternion, Vector3) to the behavior context to improve usability of these classes from scripts.
(cherry picked from commit 8156beb21181f9ff20972c8ea8be5e3dc61f1700)
5 years ago
mbalfour 33e61ad35b Added SetEntityName and exposed Get/SetEntityName to the behavior context for use from scripts.
(cherry picked from commit 4f2e0b74727cfe99c74ed588769a540f24d7aa46)
5 years ago
greerdv cc937e0809 feedback from PR 5 years ago
greerdv fd8b42c45e Merge branch 'main' into non-uniform-scale-mesh 5 years ago
greerdv f0ae8056c8 feedback from PR 5 years ago
mcgarrah 9412078992 Fixed issue if the "/Amazon/AzCore/Bootstrap/<platform>_assets" or
"/Amazon/AzCore/Bootstrap/assets" key is set, then it would append that
value to the default asset platform value for the OS
5 years ago
greerdv e497b7ac33 Merge branch 'main' into non-uniform-scale-mesh 5 years ago
mcgarrah 6d3b9e4f51 Merge remote-tracking branch 'upstream/main' into LYN-2726-ProjectRoot 5 years ago
mcgarrah 603ee5bf83 Updated the MergeSettingsToRegistry_AddRuntimeFilePaths to use the default asset platform associated with the OS, if the /Amazon/AzCore/Bootstrap/assets key isn't found in the settings registry 5 years ago
mcgarrah 96ef349931 Update the AzFramework and AzCore cmake files to point at the new location of the PlatformDefaults.h and PlatformDefaults.cpp file
Added an inline namespace for the PlatformDefaults code to ease with aliasing it into the AzFramework namespace
5 years ago
mcgarrah bf2732a26d Moved the PlatformDefaults files from AzFramework to AzCore 5 years ago