mirror of
https://github.com/hedge-dev/XenosRecomp.git
synced 2025-12-17 05:22:19 +00:00
Macro name changes.
This commit is contained in:
parent
551e3aa673
commit
5acec49c93
2 changed files with 5 additions and 5 deletions
|
|
@ -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})
|
||||
|
|
|
|||
|
|
@ -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<uint32_t *>(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<uint8_t> dxilCompressed(ZSTD_compressBound(dxil.size()));
|
||||
dxilCompressed.resize(ZSTD_compress(dxilCompressed.data(), dxilCompressed.size(), dxil.data(), dxil.size(), level));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue