Skip to content

Commit ec5e143

Browse files
committed
Fix compilation problems
1 parent fe5be0a commit ec5e143

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

3rdparty/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ set(BUILD_TESTING ${_OLD_BUILD_TESTING})
2020
add_subdirectory(openssl openssl EXCLUDE_FROM_ALL)
2121

2222
# DXC
23+
set(SPIRV-Headers_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/dxc/dxc/external/SPIRV-Headers")
24+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /fp:fast")
2325
option(_NBL_ENABLE_DXC_COMPILE_TESTS_ "Enable it in order to test compilation of Nabla shaders at build time" OFF)
2426
option(_NBL_DXC_COMPILE_TESTS_ENABLE_CMAKE_LOG_ "Enable more verbose log when creating DXC compile test target - only for Nabla developers!" OFF)
2527
set(_NBL_DXC_CT_PREFIX_CMAKE_LOG_DEBUG_ "[DXC_CT]:" CACHE INTERNAL "only for Nabla developers")

include/nbl/asset/utils/CHLSLCompiler.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
#include "nbl/asset/utils/ISPIRVOptimizer.h"
99
#include "nbl/asset/utils/IShaderCompiler.h"
1010

11-
#include <dxc/dxcapi.h>
1211
#include <combaseapi.h>
12+
#include <dxc/dxc/include/dxc/dxcapi.h>
1313

1414
namespace nbl::asset
1515
{
@@ -73,7 +73,7 @@ class NBL_API2 CHLSLCompiler final : public IShaderCompiler
7373
}
7474
};
7575

76-
DxcCompilationResult dxcCompile(asset::ICPUShader* source, LPCWSTR* args, uint32_t argCount, const SOptions& options);
76+
DxcCompilationResult dxcCompile(asset::ICPUShader* source, LPCWSTR* args, uint32_t argCount, const SOptions& options) const;
7777
};
7878

7979
}

src/nbl/asset/utils/CHLSLCompiler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ CHLSLCompiler::~CHLSLCompiler()
3636
m_dxcCompiler->Release();
3737
}
3838

39-
CHLSLCompiler::DxcCompilationResult CHLSLCompiler::dxcCompile(asset::ICPUShader* source, LPCWSTR* args, uint32_t argCount, const SOptions& options)
39+
CHLSLCompiler::DxcCompilationResult CHLSLCompiler::dxcCompile(asset::ICPUShader* source, LPCWSTR* args, uint32_t argCount, const SOptions& options) const
4040
{
4141
DxcBuffer sourceBuffer;
4242
sourceBuffer.Ptr = source->getContent()->getPointer();

0 commit comments

Comments
 (0)