Skip to content

Commit 1eabf3e

Browse files
committed
pick our SPIRV optimizer header
1 parent 11e3239 commit 1eabf3e

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/nbl/asset/utils/ISPIRVOptimizer.cpp

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#include "nbl/asset/utils/ISPIRVOptimizer.h"
22

3-
#include "spirv-tools/optimizer.hpp"
4-
#include "spirv-tools/libspirv.hpp"
3+
// quick fix to look for our SPIRV headers not from vulkan sdk
4+
#include "SPIRV-Tools/include/spirv-tools/optimizer.hpp"
55

66
#include "nbl/core/declarations.h"
77
#include "nbl/core/IReferenceCounted.h"
@@ -19,10 +19,6 @@ nbl::core::smart_refctd_ptr<ICPUBuffer> ISPIRVOptimizer::optimize(const uint32_t
1919
return spvtools::CreateScalarReplacementPass();
2020
};
2121

22-
auto CreateReduceLoadSizePass = [] {
23-
return spvtools::CreateReduceLoadSizePass();
24-
};
25-
2622
using create_pass_f_t = spvtools::Optimizer::PassToken(*)();
2723
create_pass_f_t create_pass_f[EOP_COUNT]{
2824
&spvtools::CreateMergeReturnPass,
@@ -41,7 +37,7 @@ nbl::core::smart_refctd_ptr<ICPUBuffer> ISPIRVOptimizer::optimize(const uint32_t
4137
&spvtools::CreateRedundancyEliminationPass,
4238
&spvtools::CreateLoopInvariantCodeMotionPass,
4339
&spvtools::CreateCCPPass,
44-
CreateReduceLoadSizePass,
40+
spvtools::CreateReduceLoadSizePass,
4541
&spvtools::CreateStrengthReductionPass,
4642
&spvtools::CreateIfConversionPass
4743
};

0 commit comments

Comments
 (0)