Commit Graph

81 Commits (7ddfb5d6a09a3dee45df37b5f4b40ad42cb23c14)

Author SHA1 Message Date
Steve Pham 7ddfb5d6a0
Remove AZ_TRAIT_DISABLE_FAILED_PROCESS_LAUNCHER_TESTS and disabled tests from it (#7325)
Signed-off-by: Steve Pham <82231385+spham-amzn@users.noreply.github.com>
4 years ago
Ken Pruiksma b455b915a8
Making terrain query resolution a single float instead of a Vector2 (#7186)
* Making terrain query resolution a single float instead of a Vector2

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

* Keeping the concept of different x/y step sizes in region queries since that may be useful and is separate from query resolution. Also keeping the concept of different x/y step sizes in physics since that's independent of the terrain gem.

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

* Formatting cleanups

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

* A few more minor cleanups

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

* Added support to convert serialized Vector2 query resolution to a single float.

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

* Switch ray intersection check back to using separate values for x and y resolution

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

* Fixing new unit tests added to use float query resolution.

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

* Updating automated test

Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
4 years ago
Scott Romero f7f17c98b4
[development] fixed ambiguous 'byte' type MSVC build error (#7184)
- fully quality 'byte' type in AZStd::span
- remove unnecessary 'using namespace AZStd;' statement from AssetCatalog tests

Signed-off-by: AMZN-ScottR <24445312+AMZN-ScottR@users.noreply.github.com>
4 years ago
bosnichd f34d3a822e
Add a ray cast API to the terrain system, implement it, and use it so entities can be placed on top of terrain. (#6895)
* Add a ray cast API to the terrain system, implement it, and use it so entities can be placed on top of terrain.

Still to do:
- Unit tests
- Profiling/benchmarks
- Optimization (if needed, may not be now after updating to use the iterative approach, but one option could be to use SIMD to ray cast against both triangles at once)

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

* Fix typos.

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

* Added a FindNearestIntersectionIterative to use in place of the first-pass FindnearestIntersectionRecursive attempt.

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

* Remove some functions that are no longer being used.

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

* Remove a unicode character from a comment to fix the validation build.

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

* Remove another unicode character from a comment to fix the validation build.

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

* Update to bail out as soon as t > 1.0f

Signed-off-by: bosnichd <bosnichd@amazon.com>
4 years ago
Daniel Edwards 0a5f472f43 Clang 13: Fix build errors ...
... due to local variables only being written to (but never read).

Signed-off-by: Daniel Edwards <dev@danieledwards.de>
4 years ago
Mike Balfour 145e3646a4
Asset catalog lock inversion fix. (#7045)
* Fix lock inversion.
This method was calling AssetCatalog->AssetManager at the same time that loading threads are calling AssetManager->AssetCatalog, causing a deadlock due to lock inversion. The fix is to make this method call AssetManager *outside* of the AssetCatalog call.

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

* Fixing the root cause in EnumerateAssets.
Also added a unit test that failed with the previous EnumerateAssets logic, and succeeds with the new logic.

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

* Make sure not to hold the secondary mutex lock either.

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

* Remove unused alias.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
4 years ago
amzn-sj 7bba4172ec Add a GetNumSamplesFromRegion function which returns the number of samples given a region and step size. Update Terrain Feature Processor to use this function to get the number of samples instead of computing num samples independently.
Signed-off-by: amzn-sj <srikkant@amazon.com>
4 years ago
amzn-sj 5dc442fcb0
[Terrain] First pass of the ProcessList and ProcessRegion APIs for retrieving surface data (#6729)
* [Terrain] First pass of the ProcessList and ProcessRegion APIs for retrieving surface data

Signed-off-by: amzn-sj <srikkant@amazon.com>

* Add a couple of more tests. The expected values were plugged in based on the values generated by the brute force approach.

Signed-off-by: amzn-sj <srikkant@amazon.com>

* Move some declarations out of loops since they can be reused.

Signed-off-by: amzn-sj <srikkant@amazon.com>

* Update all the per position callbacks to pass SurfacePoint refs. Construct only one SurfacePoint object outside the loop which can be reused.

Signed-off-by: amzn-sj <srikkant@amazon.com>

* Update tests to use the new per position callbacks

Signed-off-by: amzn-sj <srikkant@amazon.com>

* Add ProcessRegion functions to the terrain benchmark.

Signed-off-by: amzn-sj <srikkant@amazon.com>

* Change C style static casts to aznumeric_cast. Add maybe_unused to unused params in benchmarks.

Signed-off-by: amzn-sj <srikkant@amazon.com>

* Update the ProcessList API functions to use array_view instead of a vector. This includes some additional changes to satisfy build dependencies.

Signed-off-by: amzn-sj <srikkant@amazon.com>

* Add ProcessList API functions to benchmarks

Signed-off-by: amzn-sj <srikkant@amazon.com>

* Update the ProcessList API functions to take Vector2 as input positions

Signed-off-by: amzn-sj <srikkant@amazon.com>

* Revert changes to AtomCore library split. Add partial implementation of span(mostly just copied over from array_view) to AzCore std containers.

Signed-off-by: amzn-sj <srikkant@amazon.com>

* Adding some const/non-const overloads that were missing in span

Signed-off-by: amzn-sj <srikkant@amazon.com>

* Move input position list generation to a function

Signed-off-by: amzn-sj <srikkant@amazon.com>

* Bring back Vector3 version of ProcessList functions. Rename Vector2 version to follow similar pattern as the Get functions.

Signed-off-by: amzn-sj <srikkant@amazon.com>

* Split span.h into .h/.inl files

Signed-off-by: amzn-sj <srikkant@amazon.com>

* Add [mayby_unused] for unused parameters to fix build errors

Signed-off-by: amzn-sj <srikkant@amazon.com>
4 years ago
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>
4 years ago
AMZN-koppersr e8366040df Added unit test to cover the updates to the Spawnable Entities Aliases.
Signed-off-by: AMZN-koppersr <82230785+AMZN-koppersr@users.noreply.github.com>
4 years ago
AMZN-koppersr 1efbb7216f Addressed issues found in/by the Spawnables benchmarks and unit tests.
Signed-off-by: AMZN-koppersr <82230785+AMZN-koppersr@users.noreply.github.com>
4 years ago
Tom Hulton-Harrop 01770a1574
Fixes for `CameraInput` handling (#6425)
* add temporary optimize off calls

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

* fix + tests for camera input issue

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

* simplify boolean expression (PR feedback)

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
4 years ago
Steve Pham 5a4a96348f
Remove unused traits that disabled certain failed unit tests
- Removed trait AZ_TRAIT_DISABLE_FAILED_AP_CONNECTION_TESTS
- Removed trait AZ_TRAIT_DISABLE_FAILED_FRAMEPROFILER_TEST
- Removed trait AZ_TRAIT_DISABLE_FAILED_FRAMEWORK_TESTS
- Removed AZ_TRAIT_DISABLE_FAILED_METRICS_TESTS

Signed-off-by: Steve Pham <82231385+spham-amzn@users.noreply.github.com>
4 years ago
Steve Pham 558532f094
Process launcher updates (#6183)
* Enable process and ap connection tests on linux
* Updated 'OpenProjectManager' to use new the ProcessLauncher argument type
* Add logic to double-escape escaped double quotes in arguments on windows platforms
* Updated argument for LaunchProjectManager to reflect new ProcessLauncher argument type
* Fixed unit test arguments for 'arg=value' condition
* Fix compile errors for BuilderManager and RHI.Edit\Utils.cpp
* PAL'ify the GetCommandLineParametersAsString() to handle windows specific behavior

Signed-off-by: Steve Pham <82231385+spham-amzn@users.noreply.github.com>

Co-authored-by: byrcolin <byrcolin@amazon.com>
4 years ago
Tom Hulton-Harrop b54215552c
Prevent the camera from easily being set to an invalid orientation (#6203)
* add temporary debug logging

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

* improvement for box select sometimes getting stuck on

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

* add temporary debug logging

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

* improvement for box select sometimes getting stuck on

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

* remove temporary logging

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

* fixes for camera pitch issues

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

* missed file with camera pitch fixes

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

* remove debug logs

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

* add some tests for new pitch constraint updates

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
4 years ago
Esteban Papp b1eeebb6b6 Removes some leftover log
More Linux fixes

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
Esteban Papp 0dbf1b0b43 Enables memory tracking (leak detection) in more unit tests
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
Esteban Papp c580a0308a Fixes test in AzFramework
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
Esteban Papp bb685ee40b Merge branch 'development' into redcode/driller_removal
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
Steve Pham bd1a4a3062
Removed trait AZ_TRAIT_DISABLE_FAILED_INPUT_TESTS
* Removed trait AZ_TRAIT_DISABLE_FAILED_INPUT_TESTS (#6078)
* Added check for gamepad support
* Skip tests that rely on gamepad support on platforms that dont support it
* Use GTEST_SKIP(() if available, otherwise just use SUCCEED()

Signed-off-by: Steve Pham <82231385+spham-amzn@users.noreply.github.com>
4 years ago
Esteban Papp 47de333e94 Removes m_enableDrilling
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
rgba16f 768a196b63
Add a way to set the vsync_interval CVar from code (#5813)
* Add a way to set the render vsync from code

Signed-off-by: rgba16f <82187279+rgba16f@users.noreply.github.com>

* Update change with PR feedback. Missing whitespace plus a comment on why the assignment is outside the value changed check

Signed-off-by: rgba16f <82187279+rgba16f@users.noreply.github.com>
4 years ago
John Jones-Steele 2259cb3dc0
Moved TerrainDataRquestBus to AzFrameworkTestShared (#5835)
* Moved TerrainDataRquestBus to AzFrameworkTestShared

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 40aff91f18 Merge commit 'ebb24d2285635ee8bd840a5b58b1a519b73d8c0a' into puvvadar/gitflow_211118_o3de 4 years ago
Tom Hulton-Harrop ebb24d2285
Improvement for click detection when clicking quickly between mouse moves (#5786)
* improvement for click detection when clicking quickly between mouse moves

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

* remove magic number and introduce constant

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

* add missing update from camera test

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
4 years ago
puvvadar 33cb674355 Merge commit 'e34ea3bcaa0306699804072c6bce6eb01f65fc52' into puvvadar/gitflow_211118_o3de 4 years ago
puvvadar 4c8bb5694b Merge commit '593f03efb4996ae8bb8e1f53a55e2ba00e022449' into puvvadar/gitflow_211118_o3de 4 years ago
lumberyard-employee-dm 9d22c98c26
Add support for configuring default Archive File Search Mode through a Cache Var (#5668)
* Renamed ArchiveLocationPriority enum to FileSearchPriority and made it a proper enum class

Added an ArchiveVars.cpp which checks the a new define: `LY_ARCHIVE_FILE_SEARCH_MODE_DEFAULT`
That define represents the default value to use for the Archive system search mode

Moved the FileSearchLocation enum to the ArchiveVars.h header

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

* Updated the AssetBundleComponent to use AZ::IO::Path for level dirs

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

* Added a LY_ARCHIVE_FILE_SEARCH_MODE cache variable

The Cache Variable default value is to Archive File Search Mode to PakOnly
in Release. This can be overridden using a value for all configurations
by specifying a number of 0, 1 or 2.
Alternatively a generator expression can be used to set the Archive File
Search Mode in specific configurations.
For example to set the FileSearchMode to 1 in profile and 2 in release
the following LY_ARCHIVE_FILE_SEARCH_MODE value can be used
`$<$<CONFIG:profile>:1>$<$<CONFIG:release>:2>`

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

* Updated AssetBundler(Batch) VS Debugger arguments to populate the
project-path optoin if a single project is configured.

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

* Add support for serializing older versions of the AssetBundleManifest

This is done by attaching the "ObjectStreamWriteElementOverride"
attribute to the AssetBundleManifest reflection.
That attribute contains a function which outputs an older serialized
version of the AssetBundleManifest based on the `m_bundleVersion` member
value.

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

* AZStd::variant Serialization fix

The AttributeData<T> type is no longer suitable for storing the
ObjectStreamWriterOverrideCB function

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
4 years ago
Tom Hulton-Harrop e34ea3bcaa
Fixes for viewport selection issues (#5494)
* improvements to editor selection in the viewport

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

* fix issue with being able to select icons that are not showing for entities inside entity containers

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

* update comment after review feedback

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

* updates to viewport picking code to simplify the api

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

* add test to replicate near clip intersection issue

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

* small tidy-up changes

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

* updates to how we perform world to screen and screen to world calculations, added test coverage and some tidy-up

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

* add some more tests for ViewportInteractionImpl

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

* minor tweaks before PR feedback

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

* fix typo in fix

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

* fix for manipulator test framework tests

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

* updates to RPI::View and RenderPipeline after review feedback from VickyAtAZ

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

* add constexpr to ScreenPoint, ScreenVector and ScreenSize initializing constructors

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

* add PrintTo functions for Screen* types

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

* downgrade error to warning temporarily

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

* check incoming view is null

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

* remove pragma optimize off

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
4 years ago
Tom Hulton-Harrop 593f03efb4
Camera fixes follow-up (#5703)
* allow unconstrained camera when tracking transform and fix some camera interpolation issues

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

* tests for interpolation fixes

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

* add test for camera constraints change

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

* updates following review feeedback

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
4 years ago
bosnichd eb775a48dc
Make InputDeviceId's constructor constexpr. (#5433)
* Make InputDeviceId's constructor constexpr.

See also https://github.com/o3de/o3de/pull/4220

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

* Updates based on review feedback.

Signed-off-by: bosnichd <bosnichd@amazon.com>
4 years ago
AMZN-koppersr 83db368706 Merge branch 'development' into Prefabs/SpawnableEntityAlias 4 years ago
AMZN-koppersr b3295ffeb3 Fixed several issues with compilation of Spawnable Entities Aliases.
Signed-off-by: AMZN-koppersr <82230785+AMZN-koppersr@users.noreply.github.com>
4 years ago
AMZN-koppersr c9f9a83c57 Further PR feedback on the Spawnble Entity Aliases.
Signed-off-by: AMZN-koppersr <82230785+AMZN-koppersr@users.noreply.github.com>
4 years ago
AMZN-koppersr 567702931f Updates for the spawnable entity aliases based on provided feedback.
Signed-off-by: AMZN-koppersr <82230785+AMZN-koppersr@users.noreply.github.com>
4 years ago
Chris Burel 46d1b19816
Merge pull request #5275 from aws-lumberyard-dev/burelc/LYN-6480
[Linux] Unify Editor and Game raw mouse event handling

Signed-off-by: Chris Burel burelc@amazon.com
4 years ago
lumberyard-employee-dm 627012840d
Update how Project Filepaths are calculated when not supplied via command line (#5194)
* Fixed the return value of the ConvertToAbsolutePath function

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

* Added the generated cmake_dependencies.*.setreg files to engine.pak (#5073)

* Copied the generated cmake_dependencies.*.setreg file to the Cache
directory

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

* Removed the platform name from the bootstrap.game.*.setreg

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

* Update how the project related file paths are determined when not
supplied.

The project-path determination now goes back to only detecting a "project.json" file.
It no longer attempts to detect a "Cache" directory

The project-cache-path determination now in addition to checking the
project_cache_path key searches for a "Cache" directory.

The project-path defaults to executable folder if it cannot be detected.

The copying of generated executable folder Registry directory contents
to the product cache is now removed after the archive step.

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

* Updated the invocation of the AssetProcessor in Jenkins to supply an
absolute path to the project.

The project-path is no longer treated as relative to the engine root,
but instead relative to the current working directory at application
startup.

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

* Added constant for the storing the name of Cache directory

Fixed typos and grammatical errors in the SettingsRegistryMergeUtils.cpp

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

* Updated UnitTest prepend the EngineRoot path to "AutomatedTesting" when
setting the project path.

This is needed now that the project-path isn't treated relative to the
EngineRoot if it is not absolute.

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

* Fix AssetSeedManagerTest and PlatformAddressedAssetCatalogManagerTest

Instead of trying to used the AutomatedTesting directory as the project root, the temp directory created during the test is used as the project root.

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

* Moved the setting of the project cache root folder and project
asset platform root folder into the `if (!projectCachePath.empty())`
block

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

* Removing the scan up logic for the "Cache" directory.

This is no longer needed to locate the project cache path in a Project Game Release Layout.

Because the project path defaults to the executable directory if, it is not found, the Cache directory will be set to the "Cache" directory within the executable directory.

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
4 years ago
AMZN-stankowi 6b5f5bc666
Bundled release build bug fixes cherry picked from development (#5270)
* Fixed some files missed when groundplane_521 was renamed to 512 (#4958)

* Fixed references to 521x521 to reference the correct 512x512 FBX file

Signed-off-by: stankowi <4838196+AMZN-stankowi@users.noreply.github.com>

* Fixed asset hints

Signed-off-by: stankowi <4838196+AMZN-stankowi@users.noreply.github.com>

* Moved the Asset Catalog loading from LmbrCentral to the AzFramework::Application (#4568)

* Moved the loading of the AssetCatalog from LmbrCentralSystemComponent to AzFramework Application

Modified the AssetCatalog::InitializeCatalog function to no longer rely on the TickBus to send out the `AssetCatalogEventBus::OnCatalogLoaded` event.
It now queues a function on the AssetCatalogRequestBus to send the OnCatalogLoaded event as soon as the dispatching for the AssetCatalogRequestBus has completed on the current thread.
This is done by updating the AssetCatalogRequestBus to use EBus ThreadDispatchPolicy to add a callback to invoke any queued function has soon a thread has finished dispatching and has released its DispatchMutex

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

* Updated the AssetCatalogRequestBus to add a custom DispatchLockGuard

The AssetCatalogRequestBus uses the custom lock guard to dispatch queued
events after it has unlocked it's context mutex for the current thread.

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

* Removed GetContext call from the
AssetCatalogRequests::PostThreadDispatchInvoker

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

* Updated the definition of FileTagQueryManager::GetDefaultFileTagFilePath
function to return a path

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

* Updated the AZ_CONSOLEFREEFUNC macro to actually use the _NAME

The _NAME parameter was not being used before, resulting in the Console
stringified name of the function being used.

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

* Removed CrySystem dependencies from the BundlingSystemComponent

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

* Moved the loading of the AssetCatalog from LmbrCentralSystemComponent to AzFramework Application

Modified the AssetCatalog::InitializeCatalog function to no longer rely on the TickBus to send out the `AssetCatalogEventBus::OnCatalogLoaded` event.
It now queues a function on the AssetCatalogRequestBus to send the OnCatalogLoaded event as soon as the dispatching for the AssetCatalogRequestBus has completed on the current thread.
This is done by updating the AssetCatalogRequestBus to use EBus ThreadDispatchPolicy to add a callback to invoke any queued function has soon a thread has finished dispatching and has released its DispatchMutex

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

* Updated the AssetCatalogRequestBus to add a custom DispatchLockGuard

The AssetCatalogRequestBus uses the custom lock guard to dispatch queued
events after it has unlocked it's context mutex for the current thread.

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

* Removed GetContext call from the
AssetCatalogRequests::PostThreadDispatchInvoker

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

* Updated the definition of FileTagQueryManager::GetDefaultFileTagFilePath
function to return a path

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

* Updated the AZ_CONSOLEFREEFUNC macro to actually use the _NAME

The _NAME parameter was not being used before, resulting in the Console
stringified name of the function being used.

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

* Removed CrySystem dependencies from the BundlingSystemComponent

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

* Addded missing template parameter to AssetCatalogRequests

The fixes the compile error.

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

* Adding AssetBus::MultiHandler::BusDisconnect call

The BlastSystemComponent was connecting to the Bus, but not
disconnecting from it, causing an assert to fire to it being a
multi-thread bus

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

* Added support for DataDrive lifecycle events to the ComponentApplication

The events are using the SettingsRegistry NotifyEvent to track when
certain keys are modified to signal handlers.

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

* Corrected invalid JSON creation in ModuleManager::DeactivateEntities

Resolved clang warning about used type alias

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

* Fix for dangling reference in lambda registered to the SettingsRegistry
Notifier event

This was causing the EditorPythonBinding tests to crash due to the
following circumstances.

First Python has created an instance of a SettingsRegistryProxy
Second the SettingsRegistry sends an event during the time when the
SettingsRegistryProxy exists.

This issue was exposed due to the ComponentApplication Lifecycle events
using the SettingsRegistry to dispatch during various times of the
application workflow.

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

* Added the generated cmake_dependencies.*.setreg files to engine.pak (#5073)

* Copied the generated cmake_dependencies.*.setreg file to the Cache
directory

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

* Removed the platform name from the bootstrap.game.*.setreg

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

* Fixes for release builds with DCO fix (#5164)

* This set of changes is work toward allowing release builds to work with asset bundler generated bundles and legacy, non-prefab levels. This requires some other in-flight changes before this work is complete.

    Updated engine seed list + fixed automated test
    ComponentApplicationLifecycle has the ability to automatically register events if asked to register a handler and the event doesn't exist. This is only intended for cases where you need to register a handler early in startup before the settings registry file is loaded.
    Added two new lifecycle events: One after the system entity has been activated, and one after the system interface has been created.
    If you load an archive before the system entity has been activated, archive.cpp caches information about those archives until that time, so it can finish registration. This is because the serialization system and BundlingSystemComponent both need to be available to do this registration, but the bundles have to be loaded before those are initialized so that the settings registry file can be loaded.
    Fixed an error were mounted pak files were searching for levels.pak and not level.pak, and not finding them. I'm pretty sure this logic doesn't do anything functional either way, but I've been testing legacy levels with this change and they work now.
    Moved wildcard pak loading to where engine.pak is loaded. This is because the settings registry file that defines the IO stack to spin up must be available early in application startup, and this file must be within a mounted pak file. If you're using asset bundler generated bundles, they need to be loaded at this time so that file can be loaded.
    Atom's BootstrapSystemComponent.cpp no longer initializes on AssetCatalogLoaded, and instead initializes on the ApplicationLifecycle event SystemInterfaceCreated. This is because the base assetcatalog.xml file is really just a development time concept, this file should not be used in packaged release builds, because those builds will make use of delta catalogs in each bundle loaded. The asset catalog contains the list of all assets that were in the cache at development time, and this contains content that developers don't want to ship, and they may want to specifically hide from their customers, so data miners don't find secrets about upcoming game content.

Recovering from a branch that had incorrect DCO

Signed-off-by: stankowi <4838196+AMZN-stankowi@users.noreply.github.com>

* Fixed an incorrect ebus disconnect and removed an include that's no longer needed

Signed-off-by: stankowi <4838196+AMZN-stankowi@users.noreply.github.com>

* Fixed a copy and paste typo from trying to recover the previous pull request

Signed-off-by: stankowi <4838196+AMZN-stankowi@users.noreply.github.com>

* Updated product IDs for the settings registry builder to no longer collide with the JSON builder. Now they are based on a hash of the configuration.
Updated the engine default seed list to include the new asset ID info for the renamed bootstrap file

Signed-off-by: stankowi <4838196+AMZN-stankowi@users.noreply.github.com>

* Updated the path to the application lifecycle events, because runtime settings aren't included in the merged bootstrap file.
Addressed some feedback on printing out a string view on an error

Signed-off-by: stankowi <4838196+AMZN-stankowi@users.noreply.github.com>

* Removed a test that uses old assets that aren't relevant. We may not need this test anymore, but if we do we've backlogged a task to create a new test to cover this behavior without using old assets.

Signed-off-by: stankowi <4838196+AMZN-stankowi@users.noreply.github.com>

* Renamed SystemInterfaceCreated event to LegacySystemInterfaceCreated
Removed SystemEntityActivated event. Now that I have the rest of the fixes in this pull request, this new event wasn't needed, the already existing SystemComponentsActivated event does what I need.
Changed list to vector

Signed-off-by: stankowi <4838196+AMZN-stankowi@users.noreply.github.com>

Co-authored-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
4 years ago
Chris Burel 0502ddbe2b [Linux] Return the active window when there's no cursor constraint window
The cursor constraint window is only set by the Editor. In the game
launcher, this function was returning a null window, which makes
`GetSystemCursorPositionNormalized()` unable to determine the cursor
position. This in turn causes mouse input in ImGui to not work.

Fixes #4722, LYN-7491

Signed-off-by: Chris Burel <burelc@amazon.com>
4 years ago
Chris Burel 43c83f13c6 [Linux] Add unit tests for xcb mouse input
Signed-off-by: Chris Burel <burelc@amazon.com>
4 years ago
AMZN-koppersr 045a826c68 Updates to the Spawnable entity aliases based on provided feedback on PR.
Signed-off-by: AMZN-koppersr <82230785+AMZN-koppersr@users.noreply.github.com>
4 years ago
AMZN-koppersr 6587e149b7 Added unit tests for spawnable entity aliases.
This also fixes several issues discovered through the unit tests and renames a few functions to be clearer.

Signed-off-by: AMZN-koppersr <82230785+AMZN-koppersr@users.noreply.github.com>
4 years ago
AMZN-koppersr 66df146554 Fixed existing spawnable unit tests to work with entity alias changes.
Signed-off-by: AMZN-koppersr <82230785+AMZN-koppersr@users.noreply.github.com>
4 years ago
lumberyard-employee-dm b3b646dad9
Moved the Asset Catalog loading from LmbrCentral to the AzFramework::Application (#4568)
* Moved the loading of the AssetCatalog from LmbrCentralSystemComponent to AzFramework Application

Modified the AssetCatalog::InitializeCatalog function to no longer rely on the TickBus to send out the `AssetCatalogEventBus::OnCatalogLoaded` event.
It now queues a function on the AssetCatalogRequestBus to send the OnCatalogLoaded event as soon as the dispatching for the AssetCatalogRequestBus has completed on the current thread.
This is done by updating the AssetCatalogRequestBus to use EBus ThreadDispatchPolicy to add a callback to invoke any queued function has soon a thread has finished dispatching and has released its DispatchMutex

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

* Updated the AssetCatalogRequestBus to add a custom DispatchLockGuard

The AssetCatalogRequestBus uses the custom lock guard to dispatch queued
events after it has unlocked it's context mutex for the current thread.

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

* Removed GetContext call from the
AssetCatalogRequests::PostThreadDispatchInvoker

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

* Updated the definition of FileTagQueryManager::GetDefaultFileTagFilePath
function to return a path

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

* Updated the AZ_CONSOLEFREEFUNC macro to actually use the _NAME

The _NAME parameter was not being used before, resulting in the Console
stringified name of the function being used.

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

* Removed CrySystem dependencies from the BundlingSystemComponent

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

* Moved the loading of the AssetCatalog from LmbrCentralSystemComponent to AzFramework Application

Modified the AssetCatalog::InitializeCatalog function to no longer rely on the TickBus to send out the `AssetCatalogEventBus::OnCatalogLoaded` event.
It now queues a function on the AssetCatalogRequestBus to send the OnCatalogLoaded event as soon as the dispatching for the AssetCatalogRequestBus has completed on the current thread.
This is done by updating the AssetCatalogRequestBus to use EBus ThreadDispatchPolicy to add a callback to invoke any queued function has soon a thread has finished dispatching and has released its DispatchMutex

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

* Updated the AssetCatalogRequestBus to add a custom DispatchLockGuard

The AssetCatalogRequestBus uses the custom lock guard to dispatch queued
events after it has unlocked it's context mutex for the current thread.

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

* Removed GetContext call from the
AssetCatalogRequests::PostThreadDispatchInvoker

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

* Updated the definition of FileTagQueryManager::GetDefaultFileTagFilePath
function to return a path

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

* Updated the AZ_CONSOLEFREEFUNC macro to actually use the _NAME

The _NAME parameter was not being used before, resulting in the Console
stringified name of the function being used.

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

* Removed CrySystem dependencies from the BundlingSystemComponent

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

* Addded missing template parameter to AssetCatalogRequests

The fixes the compile error.

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

* Adding AssetBus::MultiHandler::BusDisconnect call

The BlastSystemComponent was connecting to the Bus, but not
disconnecting from it, causing an assert to fire to it being a
multi-thread bus

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

* Added support for DataDrive lifecycle events to the ComponentApplication

The events are using the SettingsRegistry NotifyEvent to track when
certain keys are modified to signal handlers.

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

* Corrected invalid JSON creation in ModuleManager::DeactivateEntities

Resolved clang warning about used type alias

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

* Fix for dangling reference in lambda registered to the SettingsRegistry
Notifier event

This was causing the EditorPythonBinding tests to crash due to the
following circumstances.

First Python has created an instance of a SettingsRegistryProxy
Second the SettingsRegistry sends an event during the time when the
SettingsRegistryProxy exists.

This issue was exposed due to the ComponentApplication Lifecycle events
using the SettingsRegistry to dispatch during various times of the
application workflow.

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
4 years ago
Esteban Papp 7651ba621c
Remove old "Integ" functionality from tests (#4688)
* fixes some warnings for newer versions of VS2022

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

* more warning fixes

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

* remove integ test filters from AzTest

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

* remove integ test handling from AzTestRunner

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

* changes integ tests of gridmate to regular tests and disables failing ones

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

* removes the Integ from the EMotionFX tests, but leaves them disabled since they are failing

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

* removes the Integ from the HttpRequestor tests and disables it since is not passing

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

* changing integ tests for DISABLED, these ones are using files that are not there

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

* fixes linux build
gridmate tests that were Integ are now disabled

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

* fixes linux warnings

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
Chris Burel 5967b419a2
Only enable the Keyboard device in the XcbKeyboard unit tests (#4682)
This prevents other input devices from interfering with the expected calls
that the Keyboard tests should make.

Signed-off-by: Chris Burel <burelc@amazon.com>
4 years ago
Chris Burel 189aa5f3ac
Disable the creation of the UserSettings.xml file in Xcb tests (#4593)
Signed-off-by: Chris Burel <burelc@amazon.com>
4 years ago
hultonha 3d1ec83f78
Update naming to CameraInput types (#4527)
* rename public facing Pivot cameras to Orbit - previous rename was a mistake

Signed-off-by: hultonha <hultonha@amazon.co.uk>

* some more comment and naming updates to improve camera documentation

Signed-off-by: hultonha <hultonha@amazon.co.uk>
4 years ago
Nicholas Lawson 6c4e16eab8
Merge pull request #4512 from aws-lumberyard-dev/burelc/xcbInputTextEvents
Generate text input events during XCB key press handling
4 years ago
Chris Burel 8668d8b2fe [XCB] Avoid emitting text events when a key press does not generate text
Many keys will generate key press events but return an empty string from
`xkb_state_key_get_utf8`, like modifier keys, arrow keys, function keys,
etc. This checks if the string retrieved from such a key press is empty
before emitting an associated text event for it, to avoid notifying a
potentially large number of listeners about an empty string.

Signed-off-by: Chris Burel <burelc@amazon.com>
4 years ago