Commit Graph

18 Commits

Author SHA1 Message Date
galibzon 169b8f3679 [ATOM-5441] Shader Builders May Fail When Multiple New Files Are Added (#3862)
* [ATOM-5441] Shader Builders May Fail When Multiple
New Files Are Added

ShaderAssetBuilder::CreateJobs now recursively parses *.azsl files
looking for #include lines and builds the list of source dependencies
using a depth-first algorithm. It was using MCPP before but not anymore
(during CreateJobs).

The new algorithm may over prescribe, but fixes the issues
when multiple new shader related files are added, at once or out of order, to a game project
or Gem.

Overall the new ShaderAssetBuilder::CreateJobs() is around 40% faster
and, of course, handles source dependencies in a robust way.

* Added new test suite to AutomatedTesting project:
Gem/PythonTests/atom_renderer/test_Atom_ShaderBuildPipelineSuite.py

Bug fix to Gems/Atom/Asset/Shader/Code/Source/Editor/ShaderAssetBuilder.cpp
discovered thanks to the automated test suite. The idea is that
CreateJobs doesn't fail if the AZSL file doesn't exist. The failure is
deferred during ProcessJob. This way if the AZSL file exists the .shader
file is rebuilt automatically.

* For testability purposes and avoid memory leakage errors
during Unit Tests created the class ShaderBuilderUtility::IncludedFilesParser

Now accepts "#  include <file>" with space between '#' and 'include'.
Also now accepts the '-' character inside the file path.

Added Unit Test to validate all cases of "#include <file>" parsing.

* Fixed linux runtime issues for Unit Tests in Atom_Asset_Shader.Tests

Signed-off-by: garrieta <garrieta@amazon.com>
2021-09-15 07:50:14 -05:00
jromnoa 6d1bb8e439 Add Light component GPU (screenshot) test to AutomatedTesting nightly o3de runs. (#2923)
* adds the Light component GPU screenshot test to AutomatedTesting

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

* add LIGHT_TYPE_PROPERTY constant to test script since it is re-used multiple times

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

* removes redundant f strings, adds LIGHT_COMPONENT and LIGHT_TYPE_PROPERTY constants for re-use, removed formattng errors, increase CMakeLists.txt timeout, add attach_component_to_entity() to hydra_editor_utils.py

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

* fix ImportError

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

* moves the LIGHT_TYPES constant to a new file since scripts rely on it that do not have the Editor launched (can't see hydra bindings so failes with ModuleNotFound error)

Signed-off-by: jromnoa <jromnoa@amazon.com>
2021-08-11 11:19:22 -07:00
jromnoa a0f3379999 Adds Light component tests (non-GPU portion) to AutomatedTesting from AtomTest (#2758)
* Fixed Vegetation Layer Spawner documentation link.

Signed-off-by: Chris Galvan <chgalvan@amazon.com>
Signed-off-by: jromnoa <jromnoa@amazon.com>

* add remaining non-GPU test portions for Light component test

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

* make non-GPU light component test more robust

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

* remove redundant logging, convert LIGHT_TYPES from list to dict, remove redundant f-string

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

Co-authored-by: Chris Galvan <chgalvan@amazon.com>
2021-08-03 14:08:59 -07:00
Steve Pham 38261d0800 Shorten copyright headers by splitting into 2 lines (#2213)
* Updated all copyright headers to split the longer original copyright line into 2 shorter lines

Signed-off-by: Steve Pham <spham@amazon.com>
2021-07-16 15:25:48 -07:00
jromnoa 6a6aa69762 increase test timeout, if it still times out I need to get RDP access to the node to fix this since a pop-up or alert is halting+timing out automation (#2041)
Signed-off-by: jromnoa <jromnoa@amazon.com>
2021-07-12 10:43:07 -07:00
Chris Galvan d7574777a8 Resolved merge conflicts
Signed-off-by: Chris Galvan <chgalvan@amazon.com>
2021-07-02 12:42:44 -05:00
Steve Pham b4a2edec6a Final update copyright headers to reference license files at the repo root (#1693)
* Final update copyright headers to reference license files at the repo root

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

* Fix copyright validator unit tests to support the stale O3DE header scenario

Signed-off-by: spham <spham@amazon.com>
2021-06-30 19:51:55 -07:00
Gene Walters 4e14c0069b Merge branch 'upstream/stabilization/2106' into genewalt/gitflow_210628 2021-06-28 19:09:20 -07:00
Steve Pham 70042fcdcd O3DE Copyright Updates for Linux Foundation (#1504) 2021-06-23 10:55:22 -07:00
jromnoa 43b253da56 main suite and not sandbox suite, since the nightly runs the main suite 2021-06-18 15:04:47 -07:00
jromnoa d904f6ab40 adds GPU test to the nightly test runs for o3de 2021-06-18 12:27:16 -07:00
AMZN-AlexOteiza 8c35347cfb Fixed build timeout failures. Added xfail and made pytest timeout to be smaller so CMake doesnt make it to timeout and python does it instead
Co-authored-by: Garcia Ruiz <aljanru@amazon.co.uk>
2021-05-20 14:31:55 +01:00
Aaron Ruiz Mora 23dba55c21 Move flaky atom renderer test from main to sandbox test suite 2021-04-26 14:58:03 +01:00
jromnoa 91ec9b4f7e add CMakeLists.txt comment removal (was missed in last commit) 2021-04-23 10:46:35 -07:00
jromnoa f2a2286a2c remove GPU requirements, clean up test verification 2021-04-22 19:16:00 -07:00
jromnoa 7623d28995 update tool_dependencies.cmake, CMakeLists.txt, hydra script 2021-04-21 14:53:02 -07:00
jromnoa ab7f40e991 add AtomTest levels, add some updated test configuration options, still need to debug an error with a tool dependency 2021-04-21 13:11:50 -07:00
jromnoa 23dec3c10e Add starting point for Hydra/EPB Atom tests in AutomatedTesting project 2021-04-20 18:56:49 -07:00