mirror of
https://github.com/hedge-dev/XenosRecomp.git
synced 2025-12-20 15:02:22 +00:00
Check for argument count & add UNLEASHED_RECOMP define when compiling shaders.
This commit is contained in:
parent
8f81380fc3
commit
55639ba868
2 changed files with 12 additions and 0 deletions
|
|
@ -54,6 +54,10 @@ IDxcBlob* DxcCompiler::compile(const std::string& shaderSource, bool compilePixe
|
||||||
|
|
||||||
args[argCount++] = L"-Qstrip_debug";
|
args[argCount++] = L"-Qstrip_debug";
|
||||||
|
|
||||||
|
#ifdef UNLEASHED_RECOMP
|
||||||
|
args[argCount++] = L"-DUNLEASHED_RECOMP";
|
||||||
|
#endif
|
||||||
|
|
||||||
IDxcResult* result = nullptr;
|
IDxcResult* result = nullptr;
|
||||||
HRESULT hr = dxcCompiler->Compile(&source, args, argCount, nullptr, IID_PPV_ARGS(&result));
|
HRESULT hr = dxcCompiler->Compile(&source, args, argCount, nullptr, IID_PPV_ARGS(&result));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,14 @@ struct RecompiledShader
|
||||||
|
|
||||||
int main(int argc, char** argv)
|
int main(int argc, char** argv)
|
||||||
{
|
{
|
||||||
|
#ifndef XENOS_RECOMP_INPUT
|
||||||
|
if (argc < 4)
|
||||||
|
{
|
||||||
|
printf("Usage: XenosRecomp [input path] [output path] [shader common header file path]");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
const char* input =
|
const char* input =
|
||||||
#ifdef XENOS_RECOMP_INPUT
|
#ifdef XENOS_RECOMP_INPUT
|
||||||
XENOS_RECOMP_INPUT
|
XENOS_RECOMP_INPUT
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue