Skip to content

Commit f2fc2fb

Browse files
author
kevyuu
committed
Skip validation for spirv optimizer
1 parent 73ef4cd commit f2fc2fb

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/nbl/asset/utils/ISPIRVOptimizer.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,10 @@ nbl::core::smart_refctd_ptr<ICPUBuffer> ISPIRVOptimizer::optimize(const uint32_t
9797
opt.SetMessageConsumer(msgConsumer);
9898

9999
std::vector<uint32_t> optimized;
100-
opt.Run(_spirv, _dwordCount, &optimized);
100+
spvtools::ValidatorOptions validatorOptions;
101+
// Nabla use Scalar block layout, we skip this validation to work around this and to save time. No need to set it since we skip validation. We set it here just in case we change our mind in the future
102+
validatorOptions.SetSkipBlockLayout(true);
103+
opt.Run(_spirv, _dwordCount, &optimized, validatorOptions, true);
101104

102105
const uint32_t resultBytesize = optimized.size() * sizeof(uint32_t);
103106
if (!resultBytesize)

0 commit comments

Comments
 (0)