File tree Expand file tree Collapse file tree 3 files changed +7
-19
lines changed Expand file tree Collapse file tree 3 files changed +7
-19
lines changed Original file line number Diff line number Diff line change 7
7
#error "USE_SSBO_FOR_INPUT should be defined."
8
8
#endif
9
9
10
- #ifndef _NBL_GLSL_EXT_FFT_BLOCK_SIZE_X_DEFINED_
11
- #define _NBL_GLSL_EXT_FFT_BLOCK_SIZE_X_DEFINED_ 256
12
- #endif
13
-
14
- #ifndef _NBL_GLSL_EXT_FFT_BLOCK_SIZE_Y_DEFINED_
15
- #define _NBL_GLSL_EXT_FFT_BLOCK_SIZE_Y_DEFINED_ 1
16
- #endif
17
-
18
- #ifndef _NBL_GLSL_EXT_FFT_BLOCK_SIZE_Z_DEFINED_
19
- #define _NBL_GLSL_EXT_FFT_BLOCK_SIZE_Z_DEFINED_ 1
20
- #endif
21
-
22
- #define _NBL_GLSL_WORKGROUP_SIZE_ (_NBL_GLSL_EXT_FFT_BLOCK_SIZE_X_DEFINED_*_NBL_GLSL_EXT_FFT_BLOCK_SIZE_Y_DEFINED_*_NBL_GLSL_EXT_FFT_BLOCK_SIZE_Z_DEFINED_)
10
+ #define _NBL_GLSL_WORKGROUP_SIZE_ 256
23
11
24
- layout(local_size_x=_NBL_GLSL_EXT_FFT_BLOCK_SIZE_X_DEFINED_ , local_size_y=_NBL_GLSL_EXT_FFT_BLOCK_SIZE_Y_DEFINED_ , local_size_z=_NBL_GLSL_EXT_FFT_BLOCK_SIZE_Z_DEFINED_ ) in;
12
+ layout(local_size_x=_NBL_GLSL_WORKGROUP_SIZE_ , local_size_y=1 , local_size_z=1 ) in;
25
13
26
14
27
15
#define _NBL_GLSL_EXT_FFT_GET_DATA_DEFINED_
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ class FFT : public core::TotalInterface
57
57
assert (core::isPoT (paddedInputDimensions.width ) && core::isPoT (paddedInputDimensions.height ) && core::isPoT (paddedInputDimensions.depth ));
58
58
DispatchInfo_t ret = {};
59
59
60
- ret.workGroupDims [0 ] = DEFAULT_WORK_GROUP_X_DIM ;
60
+ ret.workGroupDims [0 ] = DEFAULT_WORK_GROUP_SIZE ;
61
61
ret.workGroupDims [1 ] = 1 ;
62
62
ret.workGroupDims [2 ] = 1 ;
63
63
@@ -227,7 +227,7 @@ class FFT : public core::TotalInterface
227
227
FFT () = delete ;
228
228
// ~FFT() = delete;
229
229
230
- _NBL_STATIC_INLINE_CONSTEXPR uint32_t DEFAULT_WORK_GROUP_X_DIM = 256u ;
230
+ _NBL_STATIC_INLINE_CONSTEXPR uint32_t DEFAULT_WORK_GROUP_SIZE = 256u ;
231
231
232
232
static void defaultBarrier ();
233
233
};
Original file line number Diff line number Diff line change @@ -116,13 +116,13 @@ R"===(#version 430 core
116
116
117
117
const size_t extraSize = 32 + 32 + 32 + 32 ;
118
118
119
- const uint32_t maxItemsPerThread = (maxPaddedDimensionSize - 1u ) / (DEFAULT_WORK_GROUP_X_DIM ) + 1u ;
119
+ const uint32_t maxItemsPerThread = (maxPaddedDimensionSize - 1u ) / (DEFAULT_WORK_GROUP_SIZE ) + 1u ;
120
120
const uint32_t useSSBO = (DataType::SSBO == inputType) ? 1 : 0 ;
121
121
auto shader = core::make_smart_refctd_ptr<ICPUBuffer>(strlen (sourceFmt)+extraSize+1u );
122
122
snprintf (
123
123
reinterpret_cast <char *>(shader->getPointer ()),shader->getSize (), sourceFmt,
124
124
useSSBO,
125
- DEFAULT_WORK_GROUP_X_DIM ,
125
+ DEFAULT_WORK_GROUP_SIZE ,
126
126
maxPaddedDimensionSize,
127
127
maxItemsPerThread
128
128
);
@@ -271,7 +271,7 @@ void FFT::updateDescriptorSet_KernelNormalization(
271
271
}
272
272
273
273
void FFT::dispatchKernelNormalization (video::IVideoDriver* driver, asset::VkExtent3D const & paddedDimension, uint32_t numChannels) {
274
- const uint32_t dispatchSizeX = core::ceil (float (paddedDimension.width * paddedDimension.height * paddedDimension.depth * numChannels) / DEFAULT_WORK_GROUP_X_DIM );
274
+ const uint32_t dispatchSizeX = core::ceil (float (paddedDimension.width * paddedDimension.height * paddedDimension.depth * numChannels) / DEFAULT_WORK_GROUP_SIZE );
275
275
driver->dispatch (dispatchSizeX, 1 , 1 );
276
276
defaultBarrier ();
277
277
}
You can’t perform that action at this time.
0 commit comments