2014-12-07 19:09:38 -05:00
|
|
|
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
|
2014-09-24 18:27:34 -04:00
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "Core.h"
|
2014-09-29 18:57:21 -04:00
|
|
|
|
2014-09-24 18:27:34 -04:00
|
|
|
#include "hlslcc.h"
|
|
|
|
|
|
|
|
|
|
namespace CCT
|
|
|
|
|
{
|
|
|
|
|
class FRunInfo
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
enum EBackend
|
|
|
|
|
{
|
|
|
|
|
BE_Metal,
|
|
|
|
|
BE_OpenGL,
|
|
|
|
|
BE_Invalid,
|
|
|
|
|
};
|
2014-09-29 18:57:21 -04:00
|
|
|
EHlslShaderFrequency Frequency;
|
2014-09-24 18:27:34 -04:00
|
|
|
EHlslCompileTarget Target;
|
|
|
|
|
FString Entry;
|
|
|
|
|
FString InputFile;
|
|
|
|
|
FString OutputFile;
|
|
|
|
|
EBackend BackEnd;
|
2015-07-30 13:31:13 -04:00
|
|
|
bool bValidate;
|
2014-09-24 18:27:34 -04:00
|
|
|
bool bRunCPP;
|
2014-11-03 11:36:09 -05:00
|
|
|
bool bUseNew;
|
2014-11-04 14:12:02 -05:00
|
|
|
bool bList;
|
2014-11-21 12:21:29 -05:00
|
|
|
bool bPreprocessOnly;
|
2015-07-30 13:31:13 -04:00
|
|
|
bool bPackIntoUBs;
|
|
|
|
|
bool bUseDX11Clip;
|
|
|
|
|
bool bFlattenUBs;
|
|
|
|
|
bool bFlattenUBStructs;
|
|
|
|
|
bool bGroupFlattenUBs;
|
|
|
|
|
bool bCSE;
|
|
|
|
|
bool bExpandExpressions;
|
|
|
|
|
bool bSeparateShaders;
|
2014-09-24 18:27:34 -04:00
|
|
|
|
|
|
|
|
FRunInfo();
|
|
|
|
|
bool Setup(const FString& InOptions, const TArray<FString>& InSwitches);
|
|
|
|
|
|
|
|
|
|
protected:
|
2014-09-29 18:57:21 -04:00
|
|
|
static EHlslShaderFrequency ParseFrequency(TArray<FString>& InOutSwitches);
|
2014-09-24 18:27:34 -04:00
|
|
|
static EHlslCompileTarget ParseTarget(TArray<FString>& InOutSwitches, EBackend& OutBackEnd);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
void PrintUsage();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
DECLARE_LOG_CATEGORY_EXTERN(LogCrossCompilerTool, Log, All);
|