* Moved allocation to avoid crash on gtest_repeat.
Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
* Fixed GradientSignal tests to work with gtest_repeat.
Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
* Split up the save/load handling functions from PrefabIntegrationManager to improve maintainability.
Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
* Turn WarnUserOfError into a widely available utility function.
Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
* Consolidate the definitions for AzToolsFramework Entity classes (List, IdList, IdSet) to avoid multiple redefinitions across the module.
Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
* Fix usage of EntityIdList I missed in the tests.
Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
* Fix EntityList def in SliceConverter
Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
* Up the hard coded size for the HpAllocator buffer to 18KiB
Added a static assert in the HphaSchema.cpp file to validate that the
HpAllocator aligned storage buffer is at least the size of the
HpAllocator class.
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Removed comment blocks with username from HphaSchema.h
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* MacOS build fix
Updated the HpAllocator::bucket to align upwards to the nearest power of
2.
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Adding static assets to validate teh AlignUpToPowerOfTwo function.
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Prototype - refactor the selection system for the Outliner (WIP)
Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
* WIP - unify custom drag, still trying to find a way to make it so that the selection isn't affected by drag/drop of unselected entity
Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
* Wrap up changes
Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
* Minor refactor - move from enum to bool
Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
* Prevent clicks on the spacing column from selecting the entity; better refresh the hover state.
Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
* Fix weird flicker introduced by latest commit
Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
* Change color for the drag select rectangle.
Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
* Add more thorough comments, and also make some helper variables const.
Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
* Fixed incorrect variable types (Qt uses ints for on-screen dimensions)
Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
Fixed crash in Allocators Benchmark multithreaded test due to the HPHA schema not having proper multithread protection around the `mFreeTree` member in `tree_get_unused_memory` function.
The `mFreeTree intrusive set is able to modified on multiple threads.
Replaced the custom intrusive_list implementation n HPHA schema with AZStd::intrusive_list
Added a `ScopedAllocatorBenchmarkEnvironment` class to provide an RAI mechanism for initializing the SystemAllocator in Benchmark Test
Rermoved the `AzCoreBenchmarkEnvironment` in lieu of the `ScopedAllocatorBenchmarkEnvironment` class
Fixed assert when running Allocator Benchmarks in debug due to mismatch PauseTiming/ResumeTiming in Allocator Benchmark Fixtures
Added `ScopedRegisterBenchmarkEnvironment` RAII class to provide lifetime guarantees on BenchmarkEnvironments registered via the `AZ_UNIT_TEST_HOOK`
Initialized the intrusive_multiset_node members to nullptr in all build configurations instead of only debug as the cost negligible and it is useful for debugging.
fixes LYN-10210
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Added Async APIs for the various Process*FromList terrain functions.
Please note that we are currently defaulting the number of worker threads to one, because splitting the work over multiple threads causes contention when locking various mutexes, resulting in slower overall wall time for async requests split over multiple threads vs one where all the work is done on a single thread. The latter is still preferable over a regular synchronous call because it is just as quick and prevents the main thread from blocking. This should be changed once the mutex contention issues have been addressed, so that async calls automatically split the work between available job manager worker threads, unless the ProcessAsyncParams specify a different desired number of jobs.
Signed-off-by: bosnichd <bosnichd@amazon.com>
* Fix Linux builds by adding missing #include
Signed-off-by: bosnichd <bosnichd@amazon.com>
* Added a test for cancellation of terrain async requests, and fix it so that it works.
Note that the benchmarks show this implementation to be slightly slower than the previous one, which I presume is because we're now calling a 'perSurfacePointFunction' in the inner loop; this can probably be addressed, but will result in a lot of code duplication, and I think efforts will be better spent on removing the mutex contention to enable running multiple terrain async jobs at the same time.
Signed-off-by: bosnichd <bosnichd@amazon.com>
* Added Async versions for all Process*Region terrain API functions, along with benchmarks.
Signed-off-by: bosnichd <bosnichd@amazon.com>
* Fix the newly added terrain async request benchmarks to actually use the async APIs.
Signed-off-by: bosnichd <bosnichd@amazon.com>
* Revert to the original version which just calls the synchronous API from the job function, along with some other updates in response to review feedback.
Signed-off-by: bosnichd <bosnichd@amazon.com>
* Change the TerrainWorldDebugger to use the async API, along with the following changes:
- TerrainJobContext no longer uses a JobCancelGroup so we can guarantee the completion callbacks of associated jobs will be invoked even if it is cancelled.
- As a result of the above change, the ProcessAsyncCompleteCallback function signature again accepts the associated TerrainJobContext as a param.
- The TerrainProcessAsyncCancellation test has been resurrected and simplified by using binary semaphores instead of condition variables.
- All the async related TerrainSystemBenchmark functions have been simplified by using binary semaphores instead of condition variables.
- Global cancellation of all terrain jobs on deactivation of the TerrainSystem has been reintroduced, but in a different way than before.
- Other miscellaneous changes/fixes made while testing and based on earlier PR feedback.
Signed-off-by: bosnichd <bosnichd@amazon.com>
* Updates based on review feedback:
- Go back to using a vector instead of an array (fixed the original problem by adding custom copy/assignment constructors/operators to the WireframeSector struct).
- When calling WireframeSector::Reset, block until any associated in flight has completed.
- Added the concept of a minimum number of positions per terrain job.
Signed-off-by: bosnichd <bosnichd@amazon.com>
* Use semaphore instead of binary_semaphore in a bunch of places to account for the race condition where a completion callback fires before we started waiting for it.
Signed-off-by: bosnichd <bosnichd@amazon.com>
* beginning updates to surface manipulator intersect
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* initial changes to support surface manipulator being able to ignore custom entity ids
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* updates to use type aliases
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* add test for self-intersection test for SurfaceManipulator when holding Ctrl
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
This work has been on hold for a while. Revisiting removal of thumbnail contexts now while debugging related lockups exiting tools from script. Thumbnail contexts are an unused layer of indirection that makes debugging the system more difficult. All systems were only referencing the default context.
Signed-off-by: Guthrie Adams <guthadam@amazon.com>
* Updated the SFINAE checks in concepts.h and range.h
To use conjunction and disjunction for short-circuiting behavior.
Replaced AZStd::optional implementation with std::optional alias
Added range adaptor support and the following views: ref_view,
owning_view
Added bitwise or(|) overload for chaining range adaptor closures together
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Adding indirectly invocable concepts.
These concepts are used to determine whether a callable can be invoked
with a dereferenced iterator instance.
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Add implementation of range relational function objects
Add implementation of range min max functions which uses the range
relation function objects(ranges::less, ranges::equal_to, etc...)
This is needed to implement ranges::zip_view
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Adding interface for zip_view which compiles successfully
The implementation for the zip view functions still need to be filled.
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Adding function definitions for zip_view classes.
Adding empty header of subrange.h for the ranges::subrange class
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Adding additional view implementations.
The following range and view classes have been added: empty_view,
single_view and subrange.
Moved the AZ_NO_UNIQUE_ADDRESS macro to PlatformDef.h to allow other
code to specify the [[no_unique_address]] attribute.
Added additional test for view structures.
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Adding missing includes for non-unity builds
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Workaround for NDK21 clang 9.0.9 compile issue.
The AZStd::ranges::zip_view::iterator::iter_swap friend function is in the
AZStd::ranges namespace, while the customization point object of
`AZStd::ranges::customization_point_object::iter_swap` is in the regular
namespace of `AZStd::ranges` and the inline namespace of
`customization_point`.
This issue is fixed in NDK23, but as Jenkins uses NDK21 at the time, the
entire zip_view implementation has moved to inline namespace of
`zip_view_internal`
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Added iterator algorithm requiremetn concepts
Fixed the ambiguity in the ranges::iter_swap exchange overload to
exclude itself as a candidate if the iterator reference types are
swappable with each other.
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Adding type alias for borrowed_subrange_t
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Fixed convertible to ref_view check in the ranges::all
customization_point
Updated SFINAE detection of whether AZStd::to_address is invocable
Moved the
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Fixed private variable access in ranges::subrange get specialization.
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Removing ranges::view constraint from the ranges::views::single
customization_point.
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Adding C++23 range overload for string_view.
It is detailed in the [C++draft strings](https://eel.is/c++draft/strings#lib:basic_string_view,constructor____) section
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Adding implementations of ranges, find, search, mismatch and equal
functions.
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Adding implementation of ranges split_view along with test.
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Adding const overloads to SceneAPI ProxyPointer container
The Proxy Pointer class operator* and operator-> was unable to be
invoked with a const instance before. Now it returns a const view of the
pointer it contains.
This allows it to be invoked in `AZStd::to_address` as part of an SINAE
context for the contiguous_iterator concept
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Refactored the to_address implementation to better work with SFINAE.
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Adding general non-unity build fixes
This is unrelated to the RangeAdaptor changes.
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Allow range algorithms to be used with rvalue ranges
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Workaround MSVC Internal Compiler erroy by removing enable_if
condition in the operator bool of the view_interface class.
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Corrected the non_propagating_cache helper class to have public
functions
Fixed the order of creating the perfect forwarding call wrapper for an
outer closure around another closure.
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Specialized the borrowed_range and view concepts
For the AZ PathView class, since it is a immutable view around a path.
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Removed inline namespace around the zip_view class.
It was needed to workaround a clang 10 or below issue where a friend
function in a namespace and a variable within underneath an inline
namespace within the function namespace would cause an improper symbol
redefinition.
The workaround is to create a placeholder namespace containing the
inline namespace and then bring that placeholder namespace into the
parent scope.
https://bugs.llvm.org/show_bug.cgi?id=37556
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Adding implementation of the elemetns_view and join_view classes
It is up to date with the standard as of the current draft:
https://eel.is/c++draft/ranges.
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Separated definitions of concepts out of concepts.h
This allows the ranges::iter_swap and ranges::swap customization point to be moved
outside of the concepts folder and into the ranges folder.
The concepts.h header previously had to define those objects to avoid
circular dependencies.
Added the work around for ranges::iter_swap and ranges::iter_move
customization_point causing an improper symbol redefinition in clang 10
or below: https://bugs.llvm.org/show_bug.cgi?id=37556
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Alias more std:: names into the AZStd namespace.
Removed our custom implementation of toaddress.
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Adding more range view test.
The join_view and elements_view classes now have UnitTest.
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Adding deduction guides for AZStd associative containers
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Moved zip_view::sentinel iterator accessor function to zip_view.inl
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Fixed variable shadowing issues with clang 12+
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
The previous code had the `alignas()` in the wrong place, it needs to be
left of the typename.
Furthermore, `CONTEXT` has a default alignment of 16, so using `alignas(8)`
underaligns.
Signed-off-by: Chris Burel <burelc@amazon.com>
This macro was expecting that parenthesis used in the macro would be
removed during macro expansion, when they are not removed. The result was
a function call like this:
```cpp
AZ_Assert(g_SymGetSearchPath != 0, ("Can not load %s function!","SymGetSearchPath"));
```
The parenthesis cause the contents of the parenthsis to be evaluated first,
and the result is an expression using the comma operator. The comma
operator evaluates the left expression, discards the result, then
evaluates the right expression, and returns that. So the above dropping
the message, and just leaving:
```cpp
AZ_Assert(g_SymGetSearchPath != 0, "SymGetSearchPath");
```
Signed-off-by: Chris Burel <burelc@amazon.com>
Added new attribute "DisableEditButtonWheNoAssetSelected" to PropertyAssetCtrl. By default it's false, keeping the original behavior of leaving the edit button enabled and if it's clicked while there is no asset assigned it'll try to create a new one.
PhysX mesh asset property uses now this new feature.
Signed-off-by: moraaar moraaar@amazon.com