Skip to content

Commit a46b9b0

Browse files
committed
FFT readme update
1 parent 2782d8d commit a46b9b0

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

include/nbl/builtin/hlsl/fft/README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ void set(uint32_t idx, AccessType value);
1919
template <typename AccessType>
2020
void get(uint32_t idx, NBL_REF_ARG(AccessType) value);
2121
```
22-
These methods need to be able to be specialized with `AccessType` being `complex_t<Scalar>` for the FFT to work properly.
23-
Furthermore, if doing an FFT with `ElementsPerInvocationLog2 > 1`, it MUST also provide a `void memoryBarrier()` method. If not accessing any type of memory during the FFT, it can be a method that does nothing. Otherwise, it must do a barrier with `AcquireRelease` semantics, with proper semantics for the type of memory it accesses.
22+
These methods need to be able to be instantiated with `AccessType` being `complex_t<Scalar>` for the FFT to work properly.
2423
2524
* `SharedMemoryAccessor` is an accessor to a shared memory array of `uint32_t` that MUST be able to fit `WorkgroupSize` many complex elements (one per thread). When instantiating a `workgroup::fft::ConstevalParameters` struct, you can access its static member field `SharedMemoryDWORDs` that yields the amount of `uint32_t`s the shared memory array must be able to hold. It MUST provide the methods
2625
```cpp
@@ -35,7 +34,7 @@ void workgroupExecutionAndMemoryBarrier();
3534
`template <typename IndexType, typename AccessType> void set(IndexType idx, AccessType value)`,
3635
`template <typename IndexType, typename AccessType> void get(IndexType idx, NBL_REF_ARG(AccessType) value)` and
3736
`void workgroupExecutionAndMemoryBarrier()`.
38-
The templates are there in case you want to use the same accessor in other ways, but for usage with FFT those methods MUST be able to be specialized with
37+
The templates are there in case you want to use the same accessor in other ways, but for usage with FFT those methods MUST be able to be instantiated with
3938
both `IndexType` and `AccessType` being `uint32_t`. `workgroupExecutionAndMemoryBarrier()` can be any method that ensures that whenever threads shuffle via the shared memory, all threads have reached the barrier after writing their values and before reading the values they need to get from it. In our examples it's usually a `glsl::barrier()`.
4039

4140
Furthermore, you must define the method `uint32_t3 nbl::hlsl::glsl::gl_WorkGroupSize()` (usually since we know the size we will launch at compile time we make this return values based on some compile-time known constants). This is because of an issue / bug with DXC caused by SPIR-V allowing both compile-time and runtime workgroup sizes.

0 commit comments

Comments
 (0)