Skip to content

Commit f26de6a

Browse files
committed
Merge branch 'master' into dtm
2 parents 2f3e2dc + a380bb1 commit f26de6a

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)