Skip to content

Commit cc03dc9

Browse files
committed
Fixed example 28
1 parent 7195728 commit cc03dc9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

include/nbl/builtin/hlsl/workgroup/fft.hlsl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,14 +129,14 @@ struct FFTIndexingUtils
129129
// This is because Cooley-Tukey + subgroup operations end up spewing out the outputs in a weird order
130130
static uint32_t getDFTIndex(uint32_t outputIdx)
131131
{
132-
return impl::circularBitShiftRightHigher<FFTSizeLog2, FFTSizeLog2 - ElementsPerInvocationLog2 + 1>(hlsl::bitReverseAs<uint32_t, FFTSizeLog2>(outputIdx));
132+
return impl::circularBitShiftRightHigher<FFTSizeLog2, FFTSizeLog2 - ElementsPerInvocationLog2 + 1>(hlsl::bitReverseAs<uint32_t>(outputIdx, FFTSizeLog2));
133133
}
134134

135135
// This function maps the index `freqIdx` in the DFT to the index `idx` in the output array of a Nabla FFT such that `DFT[freqIdx] = NablaFFT[idx]`
136136
// It is essentially the inverse of `getDFTIndex`
137137
static uint32_t getNablaIndex(uint32_t freqIdx)
138138
{
139-
return hlsl::bitReverseAs<uint32_t, FFTSizeLog2>(impl::circularBitShiftLeftHigher<FFTSizeLog2, FFTSizeLog2 - ElementsPerInvocationLog2 + 1>(freqIdx));
139+
return hlsl::bitReverseAs<uint32_t>(impl::circularBitShiftLeftHigher<FFTSizeLog2, FFTSizeLog2 - ElementsPerInvocationLog2 + 1>(freqIdx), FFTSizeLog2);
140140
}
141141

142142
// Mirrors an index about the Nyquist frequency in the DFT order

0 commit comments

Comments
 (0)