Commit Graph

430 Commits (33cbc2db219cb77d088cb15c1774c86d9b1be9aa)

Author SHA1 Message Date
Esteban Papp 75c388b746 change conversions to static_cast
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
Esteban Papp 8ba0807cfc Code/Framework/AzCore
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
pappeste f6cdcddc52 fixes for Code/CryEngine
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
pappeste 81d26d322d Code/Framework fixes
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
Danilo Aimini 564981ab0f Merge branch 'development' of https://github.com/o3de/o3de into daimini/settings-registry-origin-tracking
# Conflicts:
#	Code/Framework/AzCore/AzCore/Settings/SettingsRegistryImpl.cpp
4 years ago
lumberyard-employee-dm 9060423592
Settings registry notification deadlock fix (#3065)
* Added a StealHandlers function to AZ Event

The StealHandlers function is able to take all the handlers from an AZ
Event parameter and register them with the current AZ Event

This allows stealing handlers from expiring AZ Events, which is useful
for a lock and swap algorithm for thread safety.
1. Lock persistent AZ::Event
2. Swap persistent AZ::Event with local AZ::Event
3. Unlock persistent AZ::Event - Other threads can now add to this
   AZ::Event
4. Invoke handlers from local AZ::Event
5. Relock persistent AZ::Event
5. Swap local AZ::Event with persistent AZ::Event
6. Local AZ::Event now contains handlers that were added when the lock
   was free
7. Persistent AZ::Event now steals from local AZ::Event
8. Unlock persistent AZ::Event

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

* Separated SettingRegistry update/query mutex from Notifier update mutex

The Settings Registry update/query mutex is also better scoped to reduce
the amount of lock time.

The Notifier mutex being separate allows the Settings Registry to signal
a notification event without being under any mutex, by locking and
swapping the notifier event with a local instance

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

* Renamed StealHandlers function to ClaimHandlers
Replaced decltype keywords in ClaimHandlers to auto

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
4 years ago
Danilo Aimini 04e64e274f Fix typo in copypasting...
Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
4 years ago
Danilo Aimini 8b8e249e05 Add new functions to mock unit test class.
Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
4 years ago
Danilo Aimini 31f40e5835 Merge branch 'development' of https://github.com/o3de/o3de into daimini/settings-registry-origin-tracking 4 years ago
Esteban Papp 3845f43088 missing header include after merge
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
Esteban Papp 9f7d280a1e Merge branch 'development' into cmake/SPEC-7484
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

# Conflicts:
#	Code/Editor/ResourceSelectorHost.cpp
4 years ago
Danilo Aimini 737cf30937 Fix documentation comments to be more accurate.
Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
4 years ago
Danilo Aimini f3fe8439a7 Fix local variable declaration.
Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
4 years ago
Artur K 4cee263033
Minimal TypeInfo header/reduce std interdependencies. (#2688)
* Minimal TypeInfo header/reduce std interdependencies.

TypeInfoSimple.h is a small header that can replace the use of
TypeInfo.h in some cases.

Signed-off-by: Nemerle <nemerle5+git@gmail.com>

* Windows build fixed

Removed algorithm.h from string_view.h

smoke-test passed

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* Resotore dynamic_pointer_cast in intrusive_ptr

Requested by reviewer.

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* Fix CI build

string.h - missed alogorithm.h, since it was removed from string_view
NodeWrapper.h - missing smart_ptr.h

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

Co-authored-by: Nemerle <nemerle5+git@gmail.com>
4 years ago
Danilo Aimini a70a106fd2 Test code to add merge detection on Settings Registry keys
Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
4 years ago
Esteban Papp 2147b1d128 Merge branch 'development' into cmake/SPEC-7484 4 years ago
carlitosan 1e0a1e1167
Merge pull request #2991 from aws-lumberyard-dev/carlitosan/development
Add JSON serializer support for the Lua component properties
4 years ago
Esteban Papp 3b9044ce5d Addressing missing test identified by @hultonha
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
Esteban Papp e3b22f51b2 @lumberyard-employee-dm suggestion to use (w)string_view as the src to simplify functions in conversions.h
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
Esteban Papp ec1a08d487 Merge branch 'development' into cmake/SPEC-7484
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

# Conflicts:
#	Code/Editor/ConfigGroup.cpp
#	Code/Editor/ControlMRU.cpp
#	Code/Editor/CryEdit.cpp
#	Code/Editor/CryEdit.h
#	Code/Editor/IEditorImpl.cpp
#	Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/AnimGraph/GameController.cpp
4 years ago
lumberyard-employee-dm adaeb7c203
Converted the AZStd implementations of unintialized construct to use std (#2843)
* Converted the AZStd implementations of unintialized construct to use std

The uninitialized_default_construct and uninitialized_value_construct
functions implementations have been removed and the Standard library
implementations have been brought into the AZStd namespace scope

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

* Added a default construct to the UninitializedValueConstruct test case
which value initializes the int member which uses zero initialization to
initalize it to zero.

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
4 years ago
SJ 44b053df58
[Mac] Building and running game projects from an SDK (#2943)
* 1. Initial support for loading dylibs outside the bundle.
2. Child processes inherit parent's environment if no environment is explicitly specified(should change to append the parent's environment even if environment variables are explicitly specified).
3. Update some time functions to use system uptime instead of wall clock time when computing elapsed time. This fixes false timeouts when the OS goes to sleep.
4. Increase wait times for AssetBuilders and some Atom tools to connect to the AssetProcessor. This is needed because GateKeeper slows down first time bootup which results in asset processing failures.
With this change we'll be able to run Editor and AssetProcessor from an install on Mac and we will also be able to build and run projects using the installed engine as an SDK.

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

* 1. Remove debug messages.
2. Fix license
3. Pass parent's environment variables to child processes by default(on Mac).

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

* 1. Add more detailed comments.2. Use a custom ly_copy for Mac and leave the default as is.

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

* Address some feedback from review

Signed-off-by: amzn-sj <srikkant@amazon.com>
4 years ago
chcurran 8571e71d93 Add JSON serializer support for the Lua component properties
Signed-off-by: chcurran <82187351+carlitosan@users.noreply.github.com>
4 years ago
Artur K fb3195d996
Reduce size of AllocationInfo struct to 64 bytes ( was 72 ) (#2771)
Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>
4 years ago
hultonha 3d15382fb6
Camera Component, Editor Viewport Widget refactoring.
Merge pull request #2840 from yuriy0/camera_and_editor_viewport_widget_improvements
4 years ago
Esteban Papp 7447df3576 Merge branch 'development' into cmake/SPEC-7484 4 years ago
Esteban Papp 6db7488939 Merge branch 'development' into cmake/SPEC-7484
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

# Conflicts:
#	Code/Editor/Animation/SkeletonHierarchy.cpp
#	Code/Editor/Animation/SkeletonMapper.cpp
#	Code/Editor/Animation/SkeletonMapperOperator.cpp
#	Code/Editor/LogFile.cpp
#	Code/Editor/ResourceSelectorHost.cpp
#	Code/Editor/SettingsManager.cpp
#	Code/Editor/Util/EditorUtils.cpp
#	Code/Editor/Util/FileUtil.cpp
#	Code/Editor/Util/IXmlHistoryManager.h
#	Code/Editor/Util/ImageTIF.cpp
#	Code/Editor/Util/StringHelpers.cpp
#	Code/Editor/Util/XmlHistoryManager.cpp
#	Code/Editor/Util/XmlHistoryManager.h
4 years ago
Esteban Papp 8adf8fd7a1 PR comments
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
Esteban Papp ae9d15c977 Mac/iOS fixes
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
Jeremy Ong 4ab7aa551d Resolve size_t conversion werrors
Signed-off-by: Jeremy Ong <jcong@amazon.com>
4 years ago
Jeremy Ong 5a05fe93d4
Merge pull request #2815 from aws-lumberyard-dev/AzCore/JobGraph
Add initial TaskGraph prototype
4 years ago
Yuriy Toporovskyy fd616fdcfb Merge remote-tracking branch 'upstream/development' into camera_and_editor_viewport_widget_improvements
Signed-off-by: Yuriy Toporovskyy <toporovskyy.y@gmail.com>
4 years ago
Jeremy Ong 4f9c2cf693 Remove TaskGraph::Drain which was only added initially for testing
The drain function was used only before the API gained the ability to
wait on the completion of a graph. This is the correct way to "drain"
the task executor of work.

Signed-off-by: Jeremy Ong <jcong@amazon.com>
4 years ago
Esteban Papp e28d04aea6 Merge branch 'development' into cmake/SPEC-7484
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

# Conflicts:
#	Code/Editor/CryEditDoc.cpp
#	Code/Editor/CryEditDoc.h
#	Code/Legacy/CryCommon/CryArray.h
#	Code/Legacy/CryCommon/CryString.h
#	Code/Legacy/CryCommon/UnicodeBinding.h
#	Code/Legacy/CrySystem/LocalizedStringManager.cpp
#	Gems/LyShine/Code/Source/StringUtfUtils.h
#	Gems/PhysXDebug/Code/Source/SystemComponent.cpp
4 years ago
Esteban Papp 6d79f1beee more replacements of A functions
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
Esteban Papp 895dc09176 addressing PR comments/suggestions
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
Esteban Papp 84623dfb66 FixedMaxPathString replacement
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
Artur K e193e5b353
EnvironmentVariableHolder: reduce the size of template instantiation. (#2857)
* EnvironmentVariableHolder: reduce the size of template instantiation.

Move almost all destruction logic to EnvironmentVariableHolderBase::UnregisterAndDestroy.
Specialized templates have DestructDispatchNoLock instead that can either destroy the held value,
or the holder itself.

UnregisterAndDestroy has been moved to the cpp file.

All of these changes reduce the profile build time and size on linux
Here, the size of bin/profile goes down by ~200MB.

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* Requested changes/fixups.

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* Use scoped_lock to simplify mutex management.

Updated comments.

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* Hopefully a fix for env variables released at a wrong time

Conditional was using incorrect variable

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* Comment fixup

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* Missing negation in conditional

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* Cleanup the internal logic in UnregisterAndDestroy

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>
4 years ago
Jeremy Ong 4743ca8bc1 Fix segfault when checking detached graph completion status
Signed-off-by: Jeremy Ong <jcong@amazon.com>
4 years ago
Esteban Papp 19d79f1559 Merge branch 'development' into cmake/SPEC-2513_w4267 4 years ago
Artur K 7448bccea3
Bunch of small bug fixes (#2813)
* fix an error with addr_impl_ref assignment operator

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* chrono duration unary '+' was missing a return

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* HierarchyMenu constructor logic fix

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* at least assert in case of invalid arguments to ring_buffer::insert

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* EditorSettings using incorrect string_view::find result comparison

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>
4 years ago
Jeremy Ong eaa6e087cf JobGraph -> TaskGraph (and associated classes/files)
This commit also addresses all PR feedback

Signed-off-by: Jeremy Ong <jcong@amazon.com>
4 years ago
Jeremy Ong d2f2a186cb Add forward declaration needed on clang
Signed-off-by: Jeremy Ong <jcong@amazon.com>
4 years ago
Jeremy Ong 4d058f329b Use exponential backoff during job submission when ring buffers are full
Signed-off-by: Jeremy Ong <jcong@amazon.com>
4 years ago
Jeremy Ong 6ac74ad41e Resolve clang compiler error
"If constexpr" branches are evaluated at template instantiation time,
but static assertions receiving false are triggered even earlier.

Signed-off-by: Jeremy Ong <jcong@amazon.com>
4 years ago
Jeremy Ong d1c06e9c80 Add JobGraph::Reset, streamline execution, address feedback
Also, came up with more useful benchmarks that actually measure the
enqueue/dequeue operations for various simple workflows. For retained
graphs, time-of-flight from submission to execution is ~1us per job,
indicating job granularity should be >20us for retained jobs. For
dynamic jobs, where we need to pay the cost of allocation, a granularity
of ~100+ us may be advised.

Signed-off-by: Jeremy Ong <jcong@amazon.com>
4 years ago
Jeremy Ong 2f57d72561 Add initial JobGraph prototype
Signed-off-by: Jeremy Ong <jcong@amazon.com>
4 years ago
Esteban Papp 9a82005cb8 PR comments/fixes
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
Yuriy Toporovskyy 3ad3dfd662 Address PR feedback
Signed-off-by: Yuriy Toporovskyy <toporovskyy.y@gmail.com>
4 years ago
Yuriy Toporovskyy 73fee0c57e Camera Component, Editor Viewport Widget refactoring.
- Handle changing of active camera entirely inside CameraComponentController
- Remove a LOT of legacy Cry things related to cameras
- Add a CameraSystemComponent to handle ActiveCameraRequestBus and CameraSystemRequestBus

Signed-off-by: Yuriy Toporovskyy <toporovskyy.y@gmail.com>
4 years ago