UE4 - hlslcc - DumpShaderInfo now outputs a better batch file for running the cross-compiler (and it's shared with GL & Metal)

[CL 2122582 by Rolando Caloca in Main branch]
This commit is contained in:
Rolando Caloca
2014-06-30 18:32:57 -04:00
committed by UnrealBot
parent 007bd651f4
commit b694adc81c
5 changed files with 109 additions and 82 deletions
@@ -157,3 +157,14 @@ bool RemoveUniformBuffersFromSource(FString& SourceCode)
return true;
}
FString CreateCrossCompilerBatchFileContents(const FString& ShaderFile, const FString& OutputFile, const FString& FrequencySwitch, const FString& EntryPoint, const FString& VersionSwitch, const FString& ExtraArguments)
{
FString BatchFile = TEXT("@echo off");
BatchFile += TEXT("\nif defined ue.hlslcc GOTO DONE\nset ue.hlslcc=");
BatchFile += FPaths::RootDir() / TEXT("Engine\\Source\\ThirdParty\\hlslcc\\hlslcc\\bin\\Win64\\VS2013\\hlslcc_64.exe");
BatchFile += TEXT("\n\n:DONE\n%ue.hlslcc% ");
BatchFile += FString::Printf(TEXT("%s -o=%s %s -entry=%s %s %s"), *ShaderFile, *OutputFile, *FrequencySwitch, *EntryPoint, *VersionSwitch, *ExtraArguments);
BatchFile += TEXT("\npause\n");
return BatchFile;
}