* Updated all array_view uses with the C++20 span.
The updates were done in the following order
1. `AZStd::array_view<([^>].+)\* ?>` -> `AZStd::span<\1 const>`
2. `AZStd::array_view<(?:const )(.+)>` -> `AZStd::span<const \1>`
3. `AZStd::array_view` -> `AZStd::span`
Removed the implementation of array_view.
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Added missing whitespace between `const` and the typename for spans.
Updated the ShaderTest comparison of the ShaderResourceGroupLayout span
to compare the sizes as well
Updated comments on some of the methods that stated that they return "an
array" to mention they return "a span".
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
There were lots of material system conflicts that had to be resolved. I expect the build is broken at this commit, and I'll fix it in followup commits.
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
Updates and fixes to support GCC for Linux
Signed-off-by: Steve Pham <82231385+spham-amzn@users.noreply.github.com>
Co-authored-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
Added supervariants to the precompiled DiffuseProbeGrid shaders for the NumRaysPerProbe values
Signed-off-by: dmcdiarmid-ly <63674186+dmcdiarmid-ly@users.noreply.github.com>
Before, the material builder was loading the MaterialTypeAsset and doing some processing with it, but was avoiding declaring job dependencies that would cause reprocessing lots of assets when a shader or .materialtype file changes. Reading the asset data isn't safe when not declaring a job dependency (or when declaring a weak job dependency like OrderOnce which is the case here). This caused to several known bugs.
The main change here is it no longer loads the MaterialTypeAsset at all; all other changes flow from there.
The biggest changes (when deferred material processing is enabled) are ...
1) MaterialSourceData no longer loads MaterialTypeAsset. All it really needs is to determine whether a string is an image file reference or an enum value, which is easy to do by just looking for the "." for the extension.
2) MaterialAssetCreator no longer produces a finalized material asset. It no longer uses MaterialAssetCreatorCommon because that only produces a non-finalized MaterialAsset, which has very different needs for the SetPropertyValue function. (We could consider merging MaterialAssetCreatorCommon into MaterialTypeAssetCreator since that's the only subclass at this point). And it doesn't do any validation against the properties layout since that can be done at runtime.
3) Moved processing of enum property values from MaterialSourceData to MaterialAsset::Finalize (this was the only thing being done in the builder that actually needed to read the material type asset data).
Also...
- Updated the MaterialAsset class mostly to clarify and formalize the two different modes it can be in: whether it is finalized or not.
- Merged the separate "IncludeMaterialPropertyNames" registry settings from MaterialConverterSystemComponent and MaterialBuilder into one "FinalizeMaterialAssets" setting used for both.
- Removed MaterialSourceData::ApplyVersionUpdates. Now the flow of data is the same regardless of whether the materials are finalized by the AP or at runtime. Version updates are always applied on the MaterialAsset.
- Added a validation check to MaterialTypeAssetCreator ensuring that once a property is renamed, the old name can never be used again for a new property. This assumption was already made previously, but not formalized, in that Material::FindPropertyIndex does not expect every caller to provide a version number for the material property name, also the material asset's list of raw property names was never versioned. The only way for this to be a safe assumption is to prevent reuse of old names.
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
* Breaking up terrain FP wip - macro materials decoupled from meshes. Mesh creation and rendering pulled out from MeshFeatureProcessor into TerrainMeshManager. Stubs added for macro and detail material managers.
Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
* Separated macro material management from the terrain feature processor. Also separated bindless image array handling from terrain feature processor.
Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
* Detail materials separated from terrain feature processor. Also pulled out Aabb2i and Vector2i into their own simple classes
Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
* Changed some classes so that when the SRG changes the classes don't need to be completely reinitialized and can instead just update their indices and push data to the new srg. Fixed an issue where MacroMaterialData wasn't being exposed to ScriptCanvas. Terrain shader reloads should now work correctly. Also added some debug logging to help catch an issue where sometimes detail materials don't seem to load.
Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
* Terrain PR reveiw updates
Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
* Some small PR review fixes. More comments in TerrainDetailMaterialManager.h
Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
* Fixing unused variable causing clang failure
Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
* Fixing unused variable in release.
Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
* Fixing a forward declare that oddly didn't work on linux.
Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
* Fixing linux missing include... not sure why only linux failed on this.
Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
* Adding missing include
Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
The bug reported that overridden texture properties would be lost whenever an entity was created, destroyed, or a prefab was created. Initially, it seemed like there was a problem with the custom JSON serializer for material properties. Debugging proved this to be incorrect because all of the data was converted to JSON values in the serializer on multiple passes. At some point during prefab patching, the data for the asset properties is lost while other values like colors and floats serialize correctly. Converting the asset data values into asset IDs resolves the immediate problem for the material component but the underlying issue is still under investigation by the prefab team. This change is being posted for review in case the underlying issue cannot be resolved in time for the next release.
Signed-off-by: Guthrie Adams <guthadam@amazon.com>
Fixing unittests and moving texture conversion into material component controller
Signed-off-by: Guthrie Adams <guthadam@amazon.com>
Make View::SortFinalizedDrawLists use child jobs so they don't block the worker thread from doing other work while waiting.
Implement a TaskGraph version of the view draw list sort.
Fix a misc bug where the scene was waiting on a task graph event twice and so hanging.
Enable MeshFeatureProcessor::Simulate to be able to use jobs when no parent job is specified because the parent job is a task.
Signed-off-by: rgba16f <82187279+rgba16f@users.noreply.github.com>
Switched to HDR irradiance.
SDK Update.
Fixed a Vulkan validation error on RayTracingSceneSrg::MeshInfo.
Improvements to DiffuseProbeGrid blending.
Signed-off-by: dmcdiarmid-ly <63674186+dmcdiarmid-ly@users.noreply.github.com>
Jobification of the sort saves 0.7ms/frame on the HighInstanceTest on my pc.
Make MeshFeatureProcessor update of the mesh cull bounds part of the job work rather than part of the simulate work. This saves 0.1ms/frame on the HighInstanceTest
Signed-off-by: rgba16f <82187279+rgba16f@users.noreply.github.com>
This fixes gamepad input for both of our ImGui integrations (which should probably be combined at some point).
Signed-off-by: bosnichd <bosnichd@amazon.com>
* Various Vulkan fixes
- Swapchain related fix for UI editor
- Object of type VkQueue is simultaneously used in the main thread and the queue thread. Pushed the swapchain invalidation to the presentation queue thread
- Added padding for DepthOfFieldData to ensure it is 16 byte aligned
- Added aspect flag for SMAAEdgeDetectionTemplate pass
- Reduced MaxUnboundedArrayDescriptors so that it is under the maxDescriptorSetSampledImages limit
- Added CopyRead flag for ReflectionScreenSpaceBlurPass related transient resources.
Signed-off-by: moudgils <47460854+moudgils@users.noreply.github.com>
* Missed file
Signed-off-by: moudgils <47460854+moudgils@users.noreply.github.com>