Skip to content

Commit 6182633

Browse files
The culprit of issue #411 was that the LUT state was completely uninitialized.
1 parent 95ddbd4 commit 6182633

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

include/nbl/asset/filters/CMipMapGenerationImageFilter.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ class CMipMapGenerationImageFilter : public CImageFilter<CMipMapGenerationImageF
123123
//blit.kernel = Kernel(); // gets default constructed, we should probably do a `static_assert` about this property
124124
static_cast<state_base_t&>(blit) = *static_cast<const state_base_t*>(state);
125125

126-
pseudo_base_t::blit_utils_t::computeScaledKernelPhasedLUT(blit.scratchMemory + pseudo_base_t::getScratchOffset(&blit, pseudo_base_t::ESU_SCALED_KERNEL_PHASED_LUT), blit.inExtentLayerCount, blit.outExtentLayerCount, blit.inImage->getCreationParameters().type, blit.kernelX, blit.kernelY, blit.kernelZ);
126+
blit.recomputeScaledKernelPhasedLUT();
127127
return blit;
128128
}
129129
};

src/nbl/asset/utils/CDerivativeMapCreator.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ core::smart_refctd_ptr<ICPUImage> CDerivativeMapCreator::createDerivativeMapFrom
187187
state.scratchMemoryByteSize = DerivativeMapFilter::getRequiredScratchByteSize(&state);
188188
state.scratchMemory = reinterpret_cast<uint8_t*>(_NBL_ALIGNED_MALLOC(state.scratchMemoryByteSize, _NBL_SIMD_ALIGNMENT));
189189

190+
state.recomputeScaledKernelPhasedLUT();
190191
const bool result = DerivativeMapFilter::execute(core::execution::par_unseq,&state);
191192
if (result)
192193
{

0 commit comments

Comments
 (0)