Gems/Atom

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
Esteban Papp
2021-09-03 20:35:39 -07:00
parent 2f71b28b97
commit 40d2fe61a1
14 changed files with 29 additions and 9 deletions
@@ -26,6 +26,7 @@ namespace AZ
static void Reflect(ReflectContext* context);
using RPI::MaterialFunctor::Process;
void Process(RuntimeContext& context) override;
private:
@@ -27,6 +27,7 @@ namespace AZ
static void Reflect(ReflectContext* context);
using RPI::MaterialFunctorSourceData::CreateFunctor;
FunctorResult CreateFunctor(const RuntimeContext& context) const override;
private:
@@ -26,6 +26,7 @@ namespace AZ
static void Reflect(ReflectContext* context);
using RPI::MaterialFunctor::Process;
void Process(RuntimeContext& context) override;
private:
@@ -25,6 +25,7 @@ namespace AZ
static void Reflect(AZ::ReflectContext* context);
using AZ::RPI::MaterialFunctorSourceData::CreateFunctor;
FunctorResult CreateFunctor(const RuntimeContext& context) const override;
private:
@@ -34,6 +34,7 @@ namespace AZ
static void Reflect(ReflectContext* context);
using RPI::MaterialFunctor::Process;
void Process(RuntimeContext& context) override;
private:
@@ -25,6 +25,7 @@ namespace AZ
static void Reflect(AZ::ReflectContext* context);
using AZ::RPI::MaterialFunctorSourceData::CreateFunctor;
FunctorResult CreateFunctor(const RuntimeContext& context) const override;
private:
@@ -44,7 +44,7 @@ namespace AZ
/// Returns the hash of the pipeline state descriptor contents.
virtual HashValue64 GetHash() const = 0;
virtual bool operator == (const PipelineStateDescriptor& rhs) const;
bool operator == (const PipelineStateDescriptor& rhs) const;
/// The pipeline layout describing the shader resource bindings.
ConstPtr<PipelineLayoutDescriptor> m_pipelineLayoutDescriptor = nullptr;
@@ -77,8 +77,7 @@ namespace AZ
/// Computes the hash value for this descriptor.
HashValue64 GetHash() const override;
virtual bool operator == (const PipelineStateDescriptorForDispatch& rhs) const;
bool operator == (const PipelineStateDescriptorForDispatch& rhs) const;
/// The compute function containing byte code to compile.
ConstPtr<ShaderStageFunction> m_computeFunction;
@@ -102,7 +101,7 @@ namespace AZ
/// Computes the hash value for this descriptor.
HashValue64 GetHash() const override;
virtual bool operator == (const PipelineStateDescriptorForDraw& rhs) const;
bool operator == (const PipelineStateDescriptorForDraw& rhs) const;
/// [Required] The vertex function to compile.
ConstPtr<ShaderStageFunction> m_vertexFunction;
@@ -135,7 +134,7 @@ namespace AZ
//! Computes the hash value for this descriptor.
HashValue64 GetHash() const override;
virtual bool operator == (const PipelineStateDescriptorForRayTracing& rhs) const;
bool operator == (const PipelineStateDescriptorForRayTracing& rhs) const;
// The ray tracing shader byte code
ConstPtr<ShaderStageFunction> m_rayTracingFunction;
@@ -53,6 +53,8 @@ namespace AZ
//! Construct filter with only pass name.
PassHierarchyFilter(const Name& passName);
virtual ~PassHierarchyFilter() = default;
//! Construct filter with pass name and its parents' names in the order of the hierarchy
//! This means k-th element is always an ancestor of the (k-1)-th element.
//! And the last element is the pass name.
@@ -23,6 +23,7 @@ namespace UnitTest
: m_serializeContext{serializeContext}
, m_outStream{&m_buffer}
{}
virtual ~SerializeTester() = default;
// Serializes an object out to a the internal stream. Resets the stream with each call.
virtual void SerializeOut(T* object, AZ::DataStream::StreamType streamType = AZ::DataStream::ST_XML);
@@ -76,7 +77,7 @@ namespace UnitTest
m_assetHandler = AZ::Data::AssetManager::Instance().GetHandler(AssetDataT::RTTI_Type());
}
~AssetTester() = default;
virtual ~AssetTester() = default;
void SerializeOut(AZ::Data::Asset<AssetDataT> assetToSave)
{
@@ -40,10 +40,9 @@ namespace AZ
: public UnitTest::AssetTester<StreamingImageAsset>
{
public:
StreamingImageAssetTester()
{
StreamingImageAssetTester() = default;
~StreamingImageAssetTester() override = default;
}
void SetAssetReady(Data::Asset<StreamingImageAsset>& asset) override
{
asset->SetReady();
@@ -55,6 +54,7 @@ namespace AZ
{
public:
ImageMipChainAssetTester() {}
~ImageMipChainAssetTester() override = default;
void SetAssetReady(Data::Asset<ImageMipChainAsset>& asset) override
{
@@ -41,6 +41,7 @@ namespace UnitTest
{
}
using MaterialFunctor::Process;
void Process(MaterialFunctor::RuntimeContext& context) override
{
m_processResult = context.SetShaderOptionValue(0, m_shaderOptionIndex, m_shaderOptionValue);
@@ -65,6 +66,7 @@ namespace UnitTest
public:
MOCK_METHOD0(ProcessCalled, void());
using MaterialFunctor::Process;
void Process(RuntimeContext& context) override
{
ProcessCalled();
@@ -87,6 +89,7 @@ namespace UnitTest
: public MaterialFunctorSourceData
{
public:
using MaterialFunctorSourceData::CreateFunctor;
FunctorResult CreateFunctor(const RuntimeContext& context) const override
{
Ptr<PropertyDependencyTestFunctor> functor = aznew PropertyDependencyTestFunctor;
@@ -142,6 +142,7 @@ namespace UnitTest
AZStd::string m_propertyName;
MaterialPropertyValueSourceData m_propertyValue;
using MaterialFunctorSourceData::CreateFunctor;
FunctorResult CreateFunctor(const RuntimeContext& context) const override
{
Ptr<ValueFunctor> functor = aznew ValueFunctor;
@@ -47,6 +47,7 @@ namespace UnitTest
;
}
using AZ::RPI::MaterialFunctor::Process;
void Process(AZ::RPI::MaterialFunctor::RuntimeContext& context) override
{
// This code isn't actually called in the unit test, but we include it here just to demonstrate what a real functor might look like.
@@ -74,6 +75,7 @@ namespace UnitTest
;
}
using AZ::RPI::MaterialFunctor::Process;
void Process(AZ::RPI::MaterialFunctor::RuntimeContext& context) override
{
// This code isn't actually called in the unit test, but we include it here just to demonstrate what a real functor might look like.
@@ -70,6 +70,7 @@ namespace UnitTest
}
}
using AZ::RPI::MaterialFunctor::Process;
void Process(AZ::RPI::MaterialFunctor::RuntimeContext& context) override
{
// This code isn't actually called in the unit test, but we include it here just to demonstrate what a real functor might look like.
@@ -110,6 +111,7 @@ namespace UnitTest
AZStd::string m_floatPropertyInputId;
AZStd::string m_float3ShaderSettingOutputId;
using MaterialFunctorSourceData::CreateFunctor;
FunctorResult CreateFunctor(const RuntimeContext& context) const override
{
Ptr<Splat3Functor> functor = aznew Splat3Functor;
@@ -138,6 +140,7 @@ namespace UnitTest
}
}
using AZ::RPI::MaterialFunctor::Process;
void Process(AZ::RPI::MaterialFunctor::RuntimeContext& context) override
{
// This code isn't actually called in the unit test, but we include it here just to demonstrate what a real functor might look like.
@@ -174,6 +177,7 @@ namespace UnitTest
m_shaderIndex{shaderIndex}
{}
using MaterialFunctorSourceData::CreateFunctor;
FunctorResult CreateFunctor(const RuntimeContext& context) const override
{
Ptr<EnableShaderFunctor> functor = aznew EnableShaderFunctor;
@@ -200,6 +204,7 @@ namespace UnitTest
}
}
using AZ::RPI::MaterialFunctor::Process;
void Process(AZ::RPI::MaterialFunctor::RuntimeContext& context) override
{
// This code isn't actually called in the unit test, but we include it here just to demonstrate what a real functor might look like.
@@ -232,6 +237,7 @@ namespace UnitTest
return options;
}
using MaterialFunctorSourceData::CreateFunctor;
FunctorResult CreateFunctor([[maybe_unused]] const RuntimeContext& context) const override
{
Ptr<SetShaderOptionFunctor> functor = aznew SetShaderOptionFunctor;