diff --git a/ShaderRecomp/CMakeLists.txt b/ShaderRecomp/CMakeLists.txt index ff1a46f..7bfbc0d 100644 --- a/ShaderRecomp/CMakeLists.txt +++ b/ShaderRecomp/CMakeLists.txt @@ -1,7 +1,7 @@ project(ShaderRecomp) if (WIN32) - option(SHADERRECOMP_DXIL "Generate DXIL shader cache" ON) + option(SHADER_RECOMP_DXIL "Generate DXIL shader cache" ON) endif() set(SMOLV_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../thirdparty/smol-v/source") @@ -39,8 +39,8 @@ endif() target_compile_definitions(ShaderRecomp PRIVATE _CRT_SECURE_NO_WARNINGS) -if (SHADERRECOMP_DXIL) - target_compile_definitions(ShaderRecomp PRIVATE SHADERRECOMP_DXIL) +if (SHADER_RECOMP_DXIL) + target_compile_definitions(ShaderRecomp PRIVATE SHADER_RECOMP_DXIL) endif() file(COPY ${PACKAGE_PREFIX_DIR}/bin/dxil.dll DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) diff --git a/ShaderRecomp/main.cpp b/ShaderRecomp/main.cpp index fe7af32..22234b1 100644 --- a/ShaderRecomp/main.cpp +++ b/ShaderRecomp/main.cpp @@ -114,7 +114,7 @@ int main(int argc, char** argv) thread_local DxcCompiler dxcCompiler; -#ifdef SHADERRECOMP_DXIL +#ifdef SHADER_RECOMP_DXIL shader.dxil = dxcCompiler.compile(recompiler.out, recompiler.isPixelShader, recompiler.specConstantsMask != 0, false); assert(shader.dxil != nullptr); assert(*(reinterpret_cast(shader.dxil->GetBufferPointer()) + 1) != 0 && "DXIL was not signed properly!"); @@ -162,7 +162,7 @@ int main(int argc, char** argv) int level = ZSTD_maxCLevel(); -#ifdef SHADERRECOMP_DXIL +#ifdef SHADER_RECOMP_DXIL std::vector dxilCompressed(ZSTD_compressBound(dxil.size())); dxilCompressed.resize(ZSTD_compress(dxilCompressed.data(), dxilCompressed.size(), dxil.data(), dxil.size(), level));