Commit Graph

25 Commits (b541d69efc1b1476eaa929a7cb81e09a3cf4185a)

Author SHA1 Message Date
galibzon b541d69efc
DXC Validation Error Difficult to See in AP Window (#4982)
* DXC Validation Error Difficult to See in AP Window

Renamed ReportErrorMessages() as ReportMessages()
All the message will be printed as a single AZ_Error()
or AZ_Warning() instead of mingled AZ_Error/AZ_Warning/AZ_TRacePrintf
which was making the output hard to read.

Signed-off-by: garrieta <garrieta@amazon.com>
4 years ago
santorac 7ba9926202 The .shader file must now include the .azsl extension when referencing a .azsl file. It will no longer be automatically appended.
Fixed an issue where the shader builder would incorrectly succeed when the .azsl file is missing.
Also renamed some variables for more consistency.
Updated all .shader files accordingly.

Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
4 years ago
Esteban Papp f3e6adce7f
LYN-6882 release builds are executing code in asserts (#4305)
* adding Windows/release to PR-validation builds

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

* changing trace back to expand to nothing for release

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

* typo

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

* more fixes

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

* fixing some more unused variable cases

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

* renaming file in ScriptCanvas that causes a msbuild warning

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

* reverting a previous change

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
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>
4 years ago
srikappa-amzn b2963f2bc1
Renamed AtomMaxFileSize to DefaultMaxFileSize (#4067)
Signed-off-by: srikappa-amzn <srikappa@amazon.com>
4 years ago
srikappa-amzn 5a6daf4352 Maximize read file size limit and set it to 1MiB for Atom use cases
Signed-off-by: srikappa-amzn <srikappa@amazon.com>
4 years ago
Steve Pham fa0f2a1007
Fix unused warnings release (#3677)
* Release build fix for Windows
* Release build fix for Android
* Release build fix for Windows
* Release build fix for Android
* Release build fix for Linux
* Release build fix for Mac
* Release build fix for iOS

Signed-off-by: Steve Pham <spham@amazon.com>
4 years ago
santorac ccd648c600 Removed unnecessary print statements
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
4 years ago
santorac 7aa24fd58f Fixed shader variant hot reload which was failing due to mismatched timestamps. The ShaderAsset was using microseconds and the ShaderVariantAsset was using system ticks. Since ticks will always be higher than microseconds, stale variants were not prevented from being used.
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
4 years ago
chcurran de9e991ccc merge development
Signed-off-by: chcurran <82187351+carlitosan@users.noreply.github.com>
4 years ago
chcurran 88121f3bb4 move JsonUtils to AzCore
Signed-off-by: chcurran <82187351+carlitosan@users.noreply.github.com>
4 years ago
galibzon 4cac875589
[ATOM-15058] Remove Automatic Entry Point Detection (#3150)
.shader files must declare at least  one entry function.

Signed-off-by: garrieta <garrieta@amazon.com>
4 years ago
chcurran 5044204839 Move JsonUtils.h for support of SC serialization
Signed-off-by: chcurran <82187351+carlitosan@users.noreply.github.com>
4 years ago
antonmic 4beb66c9ca Making pass files declare dependency on shader files (part 01)
Signed-off-by: antonmic <56370189+antonmic@users.noreply.github.com>
4 years ago
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>
4 years ago
Chris Galvan d7574777a8 Resolved merge conflicts
Signed-off-by: Chris Galvan <chgalvan@amazon.com>
5 years ago
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>
5 years ago
Gene Walters 4e14c0069b Merge branch 'upstream/stabilization/2106' into genewalt/gitflow_210628 5 years ago
Steve Pham 70042fcdcd
O3DE Copyright Updates for Linux Foundation (#1504) 5 years ago
galibzon cc615a8f32
[ATOM-15472] Shader Build Pipeline: Remove Deprecated Files And Funct… (#1079)
* [ATOM-15472] Shader Build Pipeline: Remove Deprecated Files And Functions That
Predate The Shader Supervariants

These are the essential impactful changes as a result of deprecating the
ShaderResourceGroupAsset.

* Addressed feedback by @moudgils. Better comments in header files.

* More updates related with deprecation of ShaderResourceGroupAsset

* Deleted the temporary version 2 classes.

* Updated version of the shader asset builders.

* Updated version of all the shader related classes impacted
by the Supervariant concept and deprecation of ShaderResourceGroupAsset

* Changes to *.pass and DGI, Reflections and RayTracing.

* changes to material related assets

* changes to core lights

* Changes to auxgeom/dynamic draw.

* changes to decals, lyshine, imguipass

* changes to RPI Pass classes

* Shader for SceneSrg, ViewSrg and ForwardPass Srgs.

* changes to mesh, skinned mesh, Morphtarget.

* Fixes to RayTracingPass.cpp & now allow empty srg in shaders.

* Updated Atom_RPI.Tests

* Simplified InstanceDatabase by removing AddHandler

------------------------------------------------------------------------------------
* Updated DiffuseGI precompiled shaders.
Added RayTracingSceneSrg and RayTracingMaterialSrg shader asset.
Updated ShaderAssetCreator::Clone to handle the supervariant when processing root variants.
Co-authored-by: Doug McDiarmid <dmcdiar@amazon.com>
------------------------------------------------------------------------------------

* Changed semantics for some PassSrg to SRG_PerPass_WithFallback.

AuxGeom/FixedShapeProcessor.cpp requires SRG_PerDraw on ObjectSrg.

Removed names of SceneSrg and ViewSrg from RPISystemDescriptor.cpp

* Moved ShaderLib/Atom/Features/DummyEntryFunctions.azsli
To  Gems/Atom/RPI/Assets/ShaderLib/Atom/RPI/DummyEntryFunctions.azsli

Removed redundant checking for finalization in
ShaderResourceGroupLayout.cpp

* Fixed race condition bug for Shader::FindOrCreate.
InstanceDatabase<>::CreateInstance() needs to be atomic
for instance creation and initialization.

Added optional InstanceHandler::CreateFunctionWithParams to accomodate
to the needs of Instances that need more than an asset reference
to be able to be created an initialzed.

Removed ShaderResourceGroup::FindOrCreate() only ::Create is available
now.

* Renamed scene_and_view_srgs.* as SceneAndViewSrgs.*

Changed GetAzslFileOfOrigin for GetUniqueId

* Fixed unit tests.

* Reverted the serialization name of m_uniqueId back to
"m_azslFileOfOrigin" so precompiled shaders don't fail
in layout comparison.

* Fixed AtomCore.Tests
Removed non-applicable test. InstanceDatabase.AddHandler() is not
available anymore.

* The Null rhi is re-enabled for shader compilation.

Signed-off-by: garrieta <garrieta@amazon.com>
5 years ago
galibzon 256df54575
[ATOM-15276] Shader Build Pipeline: Add Shader Supervariant System (#749)
* [ATOM-15276] Shader Build Pipeline: Add Shader Supervariant System.

Added ShaderAssetBuilder2 & ShaderVariantAssetBuilder2.

Added ShaderAsset2, ShaderVariantAsset2.

Eventually they will be the only builders. AzslBuilder &
SrgLayoutBuilder will be removed.
ShaderResourceGroupAsset will be removed. ShaderAssetBuilder &
ShaderVariantAssetBuilder will be replaced.

Signed-off-by: garrieta <garrieta@amazon.com>
5 years ago
alexpete 1044dc3da1 Integrating github/staging through commit ab87ed9 5 years ago
alexpete 36c4e827bd Integrating latest from github/staging
Integrating up through commit 5e1bdae
5 years ago
alexpete 75dc720198 Integrating latest 47acbe8 5 years ago
alexpete a10351f38d Initial commit 5 years ago