Commit Graph

189 Commits (ffdd3e85acf468dfcf34f02817d1bcf75d0b7f64)

Author SHA1 Message Date
amzn-mike 9168fe07f1
Asset Processor: Zero analysis dependency fingerprint verification (#7292)
* Move modtime scanning tests out of APM tests file and into its own file.

Changes were kept to a minimum to get things compiling, this is just a move of code

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Fix rebase compile errors

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Verify dependency fingerprints during Zero Analysis.

This fixes an issue where dependencies that weren't finished processing when AP shuts down would not resume when AP is started back up due to Zero Analysis ignoring dependencies when determining files to skip.
Added unit test for verification

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Fix compile error, make 17 a constexpr

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Fix compile error

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
4 years ago
amzn-mike 4f47f26249
Move Runtime dependency on AssetBuilder from AssetProcessor.Static to AssetProcessor and AssetProcessorBatch. (#7298)
This dependency was causing all of the asset processor modules to have to build gems, namely the unit tests which did not actually require the gems.

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
4 years ago
amzn-mike 5ec416ca1f
Asset processor: separate modtime scanning tests (#7217)
* Move modtime scanning tests out of APM tests file and into its own file.

Changes were kept to a minimum to get things compiling, this is just a move of code

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Fix rebase compile errors

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
4 years ago
lumberyard-employee-dm 52f1ef84c7
Fixed string_view compilation in GCC 10+. (#7153)
* Fixed string_view compilation in GCC 10+.

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

* More GCC 10+ Fixes.

GCC 11 seems to have an issue with linkage regarding using a lambda as a default parameter in a function declaration.

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

* GCC10+ Fix - Fixed binding to a temporary references.

> error: loop variable ‘pathName’ of type ‘const QString&’ binds to a temporary constructed from type ‘const char* const’ [-Werror=range-loop-construct]
  415 |     for (const QString& pathName : { "CrySystem",

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
4 years ago
Esteban Papp 6fad254b59 Merge branch 'development' into optimization/unused_files
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

# Conflicts:
#	Code/Editor/IEditorImpl.cpp
#	Code/Editor/IEditorImpl.h
#	Gems/LmbrCentral/Code/Tests/lmbrcentral_editor_tests_files.cmake
4 years ago
Chris Galvan 8d0dce2613
Merge pull request #7101 from siretty/fix_build_linux_clang_13
Fix Build on Linux with Clang 13 with Debug, Profile and Release Configuration
4 years ago
Chris Galvan 71640c1c82
Merge pull request #6376 from nemerle/compiletime_filerequest_code2
Compile time reduction - FileRequest & related changes
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
Esteban Papp 583020b3ae Removes unused files from AsetProcessor
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
AMZN-byrcolin c778606c89
Templates restricted (#6498)
* Templates/Restricted upgrade/fixes:
Fixed template storage format: templates now only store true relative paths and no longer save "origin" paths and "optional" has been removed, it was never used.
Upgraded all templates to new standard
Template system now correctly handles child objects: Child objects no longer have to specify restricted they inherit from parent
Restricted now operates at the object level and makes no assumptions about parent
Restricted templates can now be combined and seperated on creation
ly_get_list_relative_filename has been deprecated for o3de_pal_dir
All Gems/Projects/Templates updated to use new code

Signed-off-by: byrcolin <byrcolin@amazon.com>
4 years ago
Scott Romero 34d74857f5
[development] fix for a possible MSVC compiler bug (#6870)
Replaced a variable with the name "interface" to avoid conflict with MSVC keyword

Signed-off-by: AMZN-ScottR <24445312+AMZN-ScottR@users.noreply.github.com>
4 years ago
amzn-mike fed1278fe6
AP: product dependency optimization (#6619)
* Initial pass at optimizing product path dependency resolution

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Add version of StripAssetPlatform that doesn't allocate or copy strings.  Re-add missing test and fix up compile errors.  Add benchmark test

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Change UpdateProductDependencies to directly call s_InsertProductDependencyQuery.BindAndStep

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Add test for same filename on multiple platforms

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Rework search logic to keep track of the source of a search path (source vs product) and keep track of which search matches which dependency to avoid doing another search through every product later on

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Clean up code, expand test

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Fix paths not being lowercased by SanitizeForDatabase.  Fix UpdateProductDependencies not updating existing dependencies

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Add test for duplicate dependency matches.  Fix saving duplicates

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Clean up code

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Separate test into test and benchmark versions

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Cleanup include

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Fix includes, switch hardcoded job manager setup to use JobManagerComponent instead

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Replaced wildcard_match with PathView::Match.  Changed StripAssetPlatformNoCopy to use TokenizeNext.  Removed Environment Create/Destroy calls.  Made ScopedAllocatorFixture a base class of ScopedAllocatorSetupFixture

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Add AZ Environment create/destroy on AP test environment

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Add missing asserts on database functions

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Fix incorrect usage of StripAssetPlatformNoCopy

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Fix source/product dependency type being ignored.  Removed need for unordered_set for list of resolved dependencies.  Updated unit tests

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Better variable names

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Remove testing code

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Fix missing includes and namespaces

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
4 years ago
nemerle 90ccae7243 Merge remote-tracking branch 'upstream/development' into compiletime_filerequest_code2 4 years ago
Benjamin Jillich afc531d4c3
Fixes VS2022 error C5233: explicit lambda capture 'isSlash' is not used (#6745)
Signed-off-by: Benjamin Jillich <jillich@amazon.com>
4 years ago
nemerle f1f81c3789 Merge remote-tracking branch 'upstream/development' into compiletime_filerequest_code2 4 years ago
Chris Burel 648a21ab5c [Linux] Correct handling of new dirs added to non-recursive watch roots
Signed-off-by: Chris Burel <burelc@amazon.com>
4 years ago
Chris Burel 2bc1d8620e Rename file to adhere to PAL conventions
Signed-off-by: Chris Burel <burelc@amazon.com>
4 years ago
Chris Burel 484e27c109 Use AZStd::equal to implement path comparison
Signed-off-by: Chris Burel <burelc@amazon.com>
4 years ago
Chris Burel ce0bb1ca2b [AssetProcessor] Refactor the FileWatcher to use only one watch thread
This change reworks the AssetProcessor's FileWatcher so that it only uses
one thread. This is motivated by getting better support for inotify on
Linux. The previous architecture required calling `inotify_init` once for
each directory that was being watched, and using separate inotify instances
for each watched tree. In addition, having separate threads per watched
tree is not necessary, and just consumes system resources. Each platform
supports watching multiple directories with the same platform-specific
watcher API, so each platform has been updated accordingly.

The interface to the FileWatcher class is greatly simplified. Previously,
it supported client-supplied filtering of the paths that would generate
notifications. This was done by subclassing `FolderWatchBase` and
implementing `OnFileChange`. However, only one filter was ever used, so
that filter is now hard-coded in the FileWatcher class, and the classes
driving the old filtering mechanism are removed. Users of the interface
now have a much easier time, they just call `AddFolderWatch` with the path
to watch, and only have to connect to one set of signals, instead of
separate signals per watched directory.

Signed-off-by: Chris Burel <burelc@amazon.com>
4 years ago
Chris Burel 7ac5bc3d5c [Linux] Display a warning in AP if inotify fails to initialize
Signed-off-by: Chris Burel <burelc@amazon.com>
4 years ago
Chris Burel 04f4d5e031 [Linux] Avoid recursive inotify when a watch folder is set to recursive=false
Signed-off-by: Chris Burel <burelc@amazon.com>
4 years ago
amzn-mike 8ee384f436
Asset Processor: Remove gem loading from AP (#6488)
* AssetBuilder sends builder registration network message to AP

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Add AP activating status message

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* First builder handles registration.

Fixed deadlock caused by AP and AssetBuilder waiting on each other when registering by moving AP builder start code to a thread

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Clean up external builder registration

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Add thread description for builder manager idle thread

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Remove gem loading

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Clean up builder registration and remove unused functions

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Remove PostActivate call from batch application since it will be called after builders are registered

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Removal external builder dependency scanning since we no longer support builder dlls

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Fix missing bus disconnect

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Remove unused variable

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Moved AP-AssetBuilder specific types into AssetBuilder.Static library.  Also removed some unused/old code

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
4 years ago
amzn-mike 81453defa0
Load QIcons once for asset tree and share with each Asset Tree Item to avoid file loads for every asset and improve start up time (#6485)
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
4 years ago
amzn-mike a95b303f19
Remove Shader compiler tab from Asset Processor (#6486)
* Remove Shader compiler tab from Asset Processor

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Remove more references to shader compiler

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
4 years ago
amzn-mike 346a414aff
Change AP unit test project to a DLL like all others, add benchmarks project (#6588)
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
4 years ago
Jeremy Ong a96387ee35 Fix compile issues blocking adoption of Pix 2108
Signed-off-by: Jeremy Ong <jcong@amazon.com>
4 years ago
nemerle 5ff65be314 This reduces non-unity build time by ~2% and build size by ~0.5%.
This PR is a 'clean' version of #6199 updated to latest development

Signed-off-by: nemerle <96597+nemerle@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
Esteban Papp 7817ed76bf Removes FileIOEventBus
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
Nicholas Lawson c492d644da
Fixes #5909 hash file stats missing from AP stats log (#5913)
The "begin and end" markers were removed due to a merge conflict.  This restores them.
It also stops printing out sections that are empty - for example, if the AP runs without
processing anything, there will no longer be a "top 10 processed files" section.
Signed-off-by: lawsonamzn <70027408+lawsonamzn@users.noreply.github.com>
4 years ago
Gene Walters 7c445d9c7d
Merge pull request #5820 from aws-lumberyard-dev/LYN-8025_PipeEditorServerLogsToEditor
Pipe Editor-Server Logs Back to the Editor
4 years ago
Artur K eca2e36687
Fix clang 13 compilation problems (#5791)
* Fix clang 13 compilation problems

Re-instated ShowPlayedSequencesDebug logic by introducing no-op lambda
which replaces missing `Draw2dLabel` functionality ( added TODO marker
there )

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

* apply review suggestions

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

* Fix type in assert message

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>
4 years ago
Gene Walters 4b9aae5a1a merging latest dev
Signed-off-by: Gene Walters <genewalt@amazon.com>
4 years ago
Nicholas Lawson 1a0d466443
Adds simple stats tracking to AssetProcessor (#5573)
* Adds simple stats tracking to AssetProcessor

The system captures cumulative and individual processing times.
It avoids touching any part of the app which affects decision
making or flow, or altering any structures such as JobEntry which
are involved in processing, in order to keep it as simple and
small as possible.

Signed-off-by: lawsonamzn <70027408+lawsonamzn@users.noreply.github.com>
4 years ago
Gene Walters 6005a4e08b Merging last dev
Signed-off-by: Gene Walters <genewalt@amazon.com>
4 years ago
puvvadar 6eec6c8f8e
Merge pull request #5752 from aws-lumberyard-dev/puvvadar/gitflow_211118_o3de
Merge stabilization/2110
4 years ago
amzn-mike ae50187fba
[LYN-7520] Wildcard Source Dependencies include files in cache/excluded files (#5349)
* Add folder exclusion for wildcard source dependencies

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Exclude ignored files.  Add unit tests

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Add handling for ignored folders being added/removed

Add unit tests

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Add ExcludedFolderCacheInterface to cmake

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Fix include

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Add error message

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Cleanup includes

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Revert traits include

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Fix missing include, minor cleanup

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Add missing includes

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
4 years ago
puvvadar 01a31f2c7b Merge commit 'd0ebe4ee10741eac2d0a623610b89a44f0f3cb49' into puvvadar/gitflow_211118_o3de 4 years ago
puvvadar 69dc2ff2f6 Merge commit '9f9aa8f2a69d2adacee58a575be24ae5bb58c69c' into puvvadar/gitflow_211118_o3de 4 years ago
puvvadar 197b7b6bcb Merge commit '2ae8477683394a4cb550c58d6e024fdb7c684db3' into puvvadar/gitflow_211118_o3de 4 years ago
Qing Tao d0ebe4ee10
Follow up fix for ATOM-13512 (#5689)
* Follow up fix for ATOM-13512
Update the file mask mapping in ImageBuilder.settings.
Change Reflectance.preset to use BC4 format since it only needs once channel.

Signed-off-by: Qing Tao <55564570+VickyAtAZ@users.noreply.github.com>
4 years ago
Chris Burel 9f9aa8f2a6
[Linux] Avoid duplicating inotify watches in forked AssetBuilder processes (#5683)
The AssetProcessor on Linux uses `inotify` to monitor for file updates.
The AssetProcessor also uses a `ProcessWatcher` to launch child
AssetBuilder processes. `ProcessWatcher` accomplishes this by calling
`fork()`, which duplicates the current process, then calling `exec()`.
The `fork()` call also appears to duplicate any inotify fds. This
results in the subprocess consuming duplicate inotify watches, which is
a limited system resource (Ubunut 20 defaults
`/proc/sys/fs/inotify/max_user_watches` to 65536). The AssetProcessor
still has issues with this max, but this should free up at least half of
the uses.

Signed-off-by: Chris Burel <burelc@amazon.com>
4 years ago
Qing Tao 2ae8477683
ATOM-13512 Altering IBL ImageProcessor .preset Does Not Force Assets to Rebuild (#5639)
Changes include:
- Move config files from ImageProcessingAtom/Config/ folder to ImageProcessingAtom/Assets/Config/ folder so it can be watched as source depencies.
- Change GetSuggestedPreset function so it can return certain preset for certain file name.
- Move file mask mappings from preset to ImageBuilder.settings. But the file masks in preset can still be used.
- Changed from using project config folder's imageBuilder.Settings for override to using it as json merge patch.
- Expose GetFileHash function in AssetBuilderSDK api.


Signed-off-by: Qing Tao <55564570+VickyAtAZ@users.noreply.github.com>
4 years ago
Tommy Walton e44fa2a52a Merge commit '520c2b52d48f5e1c95e4a0ea2ec864088c70d0b9' into amzn-tommy/gitflow_211116_o3de2 4 years ago
Guthrie Adams 92c0e598d5 Starting to remove MTL asset references
Signed-off-by: Guthrie Adams <guthadam@amazon.com>
4 years ago
Nicholas Van Sickle 8d5dd4e35f Merge remote-tracking branch 'upstream/stabilization/2110' into nvsickle/StabToDevNov21
Signed-off-by: Nicholas Van Sickle <nvsickle@amazon.com>
4 years ago
AMZN-stankowi 6e70097ad7
Fixed all errors with default seeds (#5489)
* Cleaning up errors with default assets, used in bundled release builds

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

* Updated simple asset references to be to the product, not source assets

Signed-off-by: AMZN-stankowi <4838196+AMZN-stankowi@users.noreply.github.com>
4 years ago
Gene Walters fe5aeb9a5f Merging latest dev
Signed-off-by: Gene Walters <genewalt@amazon.com>
4 years ago
amzn-mike 61d0ec9d6b
Remove debug messages. (#5429)
Leaving in the print for absorbed asserts to avoid running into future situations where important asserts are accidentally absorbed

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
4 years ago
amzn-mike e0cc86e898
Remove AssetProcessorManagerTest AssertAbsorber and update test to use the one from the base class instead (#5216) (#5381)
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
(cherry picked from commit b3301414ad)

# Conflicts:
#	Code/Tools/AssetProcessor/native/tests/assetmanager/AssetProcessorManagerTest.cpp
4 years ago