50 lines
1.5 KiB
C++
50 lines
1.5 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "HAL/PlatformMath.h"
|
|
#include "MuR/Image.h"
|
|
#include "MuR/Operations.h"
|
|
#include "MuR/Ptr.h"
|
|
#include "MuT/AST.h"
|
|
|
|
|
|
namespace mu
|
|
{
|
|
struct FProgram;
|
|
|
|
class ASTOpImageSwizzle final : public ASTOp
|
|
{
|
|
public:
|
|
|
|
ASTChild Sources[MUTABLE_OP_MAX_SWIZZLE_CHANNELS];
|
|
|
|
uint8 SourceChannels[MUTABLE_OP_MAX_SWIZZLE_CHANNELS] = { 0,0,0,0 };
|
|
|
|
EImageFormat Format = EImageFormat::None;
|
|
|
|
public:
|
|
|
|
ASTOpImageSwizzle();
|
|
ASTOpImageSwizzle(const ASTOpImageSwizzle&) = delete;
|
|
~ASTOpImageSwizzle();
|
|
|
|
virtual EOpType GetOpType() const override { return EOpType::IM_SWIZZLE; }
|
|
virtual uint64 Hash() const override;
|
|
virtual bool IsEqual(const ASTOp&) const override;
|
|
virtual Ptr<ASTOp> Clone(MapChildFuncRef) const override;
|
|
virtual void ForEachChild(const TFunctionRef<void(ASTChild&)>) override;
|
|
virtual void Link(FProgram&, FLinkerOptions*) override;
|
|
virtual Ptr<ASTOp> OptimiseSemantic(const FModelOptimizationOptions&, int32 Pass) const override;
|
|
virtual Ptr<ASTOp> OptimiseSink(const FModelOptimizationOptions&, FOptimizeSinkContext&) const override;
|
|
virtual FImageDesc GetImageDesc(bool bReturnBestOption, FGetImageDescContext*) const override;
|
|
virtual void GetLayoutBlockSize(int32* OutBlockX, int32* OutBlockY) override;
|
|
virtual bool IsImagePlainConstant(FVector4f& OutColour) const override;
|
|
virtual Ptr<ImageSizeExpression> GetImageSizeExpression() const override;
|
|
virtual FSourceDataDescriptor GetSourceDataDescriptor(FGetSourceDataDescriptorContext*) const override;
|
|
|
|
};
|
|
|
|
}
|
|
|