48 lines
1.6 KiB
C++
48 lines
1.6 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "HAL/Platform.h"
|
|
#include "MuR/Image.h"
|
|
#include "MuR/Operations.h"
|
|
#include "MuR/Ptr.h"
|
|
#include "MuT/AST.h"
|
|
|
|
|
|
namespace mu
|
|
{
|
|
struct FProgram;
|
|
|
|
class ASTOpImagePixelFormat final : public ASTOp
|
|
{
|
|
public:
|
|
|
|
ASTChild Source;
|
|
EImageFormat Format = EImageFormat::None;
|
|
EImageFormat FormatIfAlpha = EImageFormat::None;
|
|
|
|
public:
|
|
|
|
ASTOpImagePixelFormat();
|
|
ASTOpImagePixelFormat(const ASTOpImagePixelFormat&) = delete;
|
|
~ASTOpImagePixelFormat();
|
|
|
|
virtual EOpType GetOpType() const override { return EOpType::IM_PIXELFORMAT; }
|
|
virtual uint64 Hash() const override;
|
|
virtual bool IsEqual(const ASTOp& otherUntyped) const override;
|
|
virtual Ptr<ASTOp> Clone(MapChildFuncRef mapChild) const override;
|
|
virtual void ForEachChild(const TFunctionRef<void(ASTChild&)>) override;
|
|
virtual void Link(FProgram& program, FLinkerOptions* Options) override;
|
|
virtual Ptr<ASTOp> OptimiseSemantic(const FModelOptimizationOptions& options, int32 Pass) const override;
|
|
virtual Ptr<ASTOp> OptimiseSink(const FModelOptimizationOptions& options, FOptimizeSinkContext& context) const override;
|
|
virtual FImageDesc GetImageDesc(bool returnBestOption, FGetImageDescContext* context) const override;
|
|
virtual void GetLayoutBlockSize(int* pBlockX, int* pBlockY) override;
|
|
virtual bool IsImagePlainConstant(FVector4f& colour) const override;
|
|
virtual Ptr<ImageSizeExpression> GetImageSizeExpression() const override;
|
|
virtual FSourceDataDescriptor GetSourceDataDescriptor(FGetSourceDataDescriptorContext*) const override;
|
|
|
|
};
|
|
|
|
}
|
|
|