Skip to content

Commit 470acd2

Browse files
committed
Merged last 2 dispatches into 1.
1 parent 7dc7ddc commit 470acd2

File tree

7 files changed

+178
-75
lines changed

7 files changed

+178
-75
lines changed

examples_tests/49.ComputeFFT/fft_convolve_ifft.comp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
// WorkGroup Size
22

3-
#define _NBL_GLSL_WORKGROUP_SIZE_ 256
3+
4+
#ifndef _NBL_GLSL_EXT_FFT_MAX_CHANNELS
5+
#define _NBL_GLSL_EXT_FFT_MAX_CHANNELS 4
6+
#endif
7+
8+
#ifndef _NBL_GLSL_EXT_FFT_WORKGROUP_SIZE_
9+
#define _NBL_GLSL_EXT_FFT_WORKGROUP_SIZE_ 256
10+
#endif
11+
#define _NBL_GLSL_WORKGROUP_SIZE_ _NBL_GLSL_EXT_FFT_WORKGROUP_SIZE_
412

513
layout(local_size_x=_NBL_GLSL_WORKGROUP_SIZE_, local_size_y=1, local_size_z=1) in;
614

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
#ifndef _NBL_GLSL_EXT_DEFAULT_COMPUTE_FFT_INCLUDED_
2+
#define _NBL_GLSL_EXT_DEFAULT_COMPUTE_FFT_INCLUDED_
3+
4+
// WorkGroup Size
5+
6+
#ifndef _NBL_GLSL_EXT_FFT_MAX_CHANNELS
7+
#define _NBL_GLSL_EXT_FFT_MAX_CHANNELS 4
8+
#endif
9+
10+
#ifndef _NBL_GLSL_EXT_FFT_WORKGROUP_SIZE_
11+
#define _NBL_GLSL_EXT_FFT_WORKGROUP_SIZE_ 256
12+
#endif
13+
#define _NBL_GLSL_WORKGROUP_SIZE_ _NBL_GLSL_EXT_FFT_WORKGROUP_SIZE_
14+
15+
layout(local_size_x=_NBL_GLSL_EXT_FFT_WORKGROUP_SIZE_, local_size_y=1, local_size_z=1) in;
16+
17+
#define _NBL_GLSL_EXT_FFT_GET_PARAMETERS_DEFINED_
18+
#define _NBL_GLSL_EXT_FFT_GET_DATA_DEFINED_
19+
#define _NBL_GLSL_EXT_FFT_SET_DATA_DEFINED_
20+
#define _NBL_GLSL_EXT_FFT_GET_PADDED_DATA_DEFINED_
21+
#include "nbl/builtin/glsl/ext/FFT/fft.glsl"
22+
23+
// Input Descriptor
24+
25+
layout(set=0, binding=0) readonly restrict buffer InputBuffer
26+
{
27+
nbl_glsl_complex inData[];
28+
};
29+
30+
// Output Descriptor
31+
32+
layout(set=0, binding=1, rgba16f) uniform image2D outImage;
33+
34+
// Get/Set Data Function
35+
36+
layout(push_constant) uniform PushConstants
37+
{
38+
layout (offset = 0) nbl_glsl_ext_FFT_Parameters_t params;
39+
layout (offset = 32) uvec3 kernel_dimension;
40+
} pc;
41+
42+
nbl_glsl_ext_FFT_Parameters_t nbl_glsl_ext_FFT_getParameters() {
43+
nbl_glsl_ext_FFT_Parameters_t ret;
44+
ret = pc.params;
45+
return ret;
46+
}
47+
48+
nbl_glsl_complex nbl_glsl_ext_FFT_getData(in uvec3 coordinate, in uint channel)
49+
{
50+
nbl_glsl_complex retValue = nbl_glsl_complex(0, 0);
51+
uvec3 dimension = nbl_glsl_ext_FFT_Parameters_t_getDimensions();
52+
uint index = channel * (dimension.x * dimension.y * dimension.z) + coordinate.z * (dimension.x * dimension.y) + coordinate.y * (dimension.x) + coordinate.x;
53+
retValue = inData[index];
54+
return retValue;
55+
}
56+
57+
void nbl_glsl_ext_FFT_setData(in uvec3 coordinate, in uint channel, in nbl_glsl_complex complex_value)
58+
{
59+
ivec2 coords = ivec2(coordinate.xy) - ivec2(pc.kernel_dimension.xy);
60+
vec4 color_value = imageLoad(outImage, coords);
61+
color_value[channel] = complex_value.x;
62+
imageStore(outImage, coords, color_value);
63+
}
64+
65+
nbl_glsl_complex nbl_glsl_ext_FFT_getPaddedData(in uvec3 coordinate, in uint channel)
66+
{
67+
uvec3 max_coord = nbl_glsl_ext_FFT_Parameters_t_getDimensions() - uvec3(1u);
68+
uvec3 clamped_coord = min(coordinate, max_coord);
69+
70+
bool is_out_of_range = any(bvec3(coordinate!=clamped_coord));
71+
72+
uint paddingType = nbl_glsl_ext_FFT_Parameters_t_getPaddingType();
73+
74+
if (_NBL_GLSL_EXT_FFT_FILL_WITH_ZERO_ == paddingType && is_out_of_range) {
75+
return nbl_glsl_complex(0, 0);
76+
}
77+
78+
return nbl_glsl_ext_FFT_getData(clamped_coord, channel);
79+
}
80+
81+
void main()
82+
{
83+
nbl_glsl_ext_FFT(nbl_glsl_ext_FFT_Parameters_t_getIsInverse());
84+
}
85+
86+
#endif

examples_tests/49.ComputeFFT/main.cpp

Lines changed: 71 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,9 @@ static inline core::smart_refctd_ptr<video::IGPUPipelineLayout> getPipelineLayou
8686
static inline core::smart_refctd_ptr<video::IGPUSpecializedShader> createShader_Convolution(
8787
video::IVideoDriver* driver,
8888
IAssetManager* am,
89-
uint32_t maxDimensionSize) {
89+
uint32_t maxDimensionSize,
90+
uint32_t maxNumChannels)
91+
{
9092
uint32_t const maxPaddedDimensionSize = core::roundUpToPoT(maxDimensionSize);
9193

9294
const char* sourceFmt =
@@ -95,6 +97,7 @@ R"===(#version 430 core
9597
#define _NBL_GLSL_EXT_FFT_WORKGROUP_SIZE_ %u
9698
#define _NBL_GLSL_EXT_FFT_MAX_DIM_SIZE_ %u
9799
#define _NBL_GLSL_EXT_FFT_MAX_ITEMS_PER_THREAD %u
100+
#define _NBL_GLSL_EXT_FFT_MAX_CHANNELS %u
98101
99102
#include "../fft_convolve_ifft.comp"
100103
@@ -109,7 +112,8 @@ R"===(#version 430 core
109112
reinterpret_cast<char*>(shader->getPointer()),shader->getSize(), sourceFmt,
110113
DEFAULT_WORK_GROUP_SIZE,
111114
maxPaddedDimensionSize,
112-
maxItemsPerThread
115+
maxItemsPerThread,
116+
maxNumChannels
113117
);
114118

115119
auto cpuSpecializedShader = core::make_smart_refctd_ptr<ICPUSpecializedShader>(
@@ -160,24 +164,22 @@ static inline void updateDescriptorSet_Convolution (
160164
driver->updateDescriptorSets(descCount, pWrites, 0u, nullptr);
161165
}
162166

163-
static inline core::smart_refctd_ptr<video::IGPUPipelineLayout> getPipelineLayout_RemovePadding(video::IVideoDriver* driver) {
164-
static const asset::SPushConstantRange ranges[3] =
167+
static inline core::smart_refctd_ptr<video::IGPUPipelineLayout> getPipelineLayout_LastFFT(video::IVideoDriver* driver) {
168+
169+
using FFTClass = ext::FFT::FFT;
170+
171+
static const asset::SPushConstantRange ranges[2] =
165172
{
166173
{
167174
ISpecializedShader::ESS_COMPUTE,
168175
0u,
169-
sizeof(uint32_t) * 3
176+
sizeof(FFTClass::Parameters_t)
170177
},
171178
{
172179
ISpecializedShader::ESS_COMPUTE,
173-
sizeof(uint32_t) * 4,
180+
sizeof(FFTClass::Parameters_t),
174181
sizeof(uint32_t) * 3
175182
},
176-
{
177-
ISpecializedShader::ESS_COMPUTE,
178-
sizeof(uint32_t) * 8,
179-
sizeof(uint32_t)
180-
},
181183
};
182184

183185
static IGPUDescriptorSetLayout::SBinding bnd[] =
@@ -198,28 +200,59 @@ static inline core::smart_refctd_ptr<video::IGPUPipelineLayout> getPipelineLayou
198200
},
199201
};
200202

201-
core::SRange<const asset::SPushConstantRange> pcRange = {ranges, ranges+3};
203+
core::SRange<const asset::SPushConstantRange> pcRange = {ranges, ranges+2};
202204
core::SRange<const video::IGPUDescriptorSetLayout::SBinding> bindings = {bnd, bnd+sizeof(bnd)/sizeof(IGPUDescriptorSetLayout::SBinding)};;
203205

204206
return driver->createGPUPipelineLayout(
205207
pcRange.begin(),pcRange.end(),
206208
driver->createGPUDescriptorSetLayout(bindings.begin(),bindings.end()),nullptr,nullptr,nullptr
207209
);
208210
}
209-
static inline core::smart_refctd_ptr<video::IGPUSpecializedShader> createShader_RemovePadding(
211+
static inline core::smart_refctd_ptr<video::IGPUSpecializedShader> createShader_LastFFT(
210212
video::IVideoDriver* driver,
211-
IAssetManager* am) {
213+
IAssetManager* am,
214+
uint32_t maxDimensionSize,
215+
uint32_t maxNumChannels) {
216+
217+
uint32_t const maxPaddedDimensionSize = core::roundUpToPoT(maxDimensionSize);
212218

213-
IAssetLoader::SAssetLoadParams lp;
214-
auto file_path = "../remove_padding.comp";
215-
auto shaderAsset = am->getAsset(file_path, lp);
216-
auto cpucs = IAsset::castDown<ICPUSpecializedShader>(shaderAsset.getContents().begin()[0]);
217-
auto cs = driver->createGPUShader(nbl::core::smart_refctd_ptr<const ICPUShader>((cpucs->getUnspecialized())));
218-
asset::ISpecializedShader::SInfo csinfo(nullptr, nullptr, "main", asset::ISpecializedShader::ESS_COMPUTE, file_path);
219-
auto cs_spec = driver->createGPUSpecializedShader(cs.get(), csinfo);
220-
return cs_spec;
219+
const char* sourceFmt =
220+
R"===(#version 430 core
221+
222+
#define _NBL_GLSL_EXT_FFT_WORKGROUP_SIZE_ %u
223+
#define _NBL_GLSL_EXT_FFT_MAX_DIM_SIZE_ %u
224+
#define _NBL_GLSL_EXT_FFT_MAX_ITEMS_PER_THREAD %u
225+
#define _NBL_GLSL_EXT_FFT_MAX_CHANNELS %u
226+
227+
#include "../last_fft.comp"
228+
229+
)===";
230+
231+
const size_t extraSize = 32 + 32 + 32 + 32;
232+
233+
constexpr uint32_t DEFAULT_WORK_GROUP_SIZE = 256u;
234+
const uint32_t maxItemsPerThread = (maxPaddedDimensionSize - 1u) / (DEFAULT_WORK_GROUP_SIZE) + 1u;
235+
auto shader = core::make_smart_refctd_ptr<ICPUBuffer>(strlen(sourceFmt)+extraSize+1u);
236+
snprintf(
237+
reinterpret_cast<char*>(shader->getPointer()),shader->getSize(), sourceFmt,
238+
DEFAULT_WORK_GROUP_SIZE,
239+
maxPaddedDimensionSize,
240+
maxItemsPerThread,
241+
maxNumChannels
242+
);
243+
244+
auto cpuSpecializedShader = core::make_smart_refctd_ptr<ICPUSpecializedShader>(
245+
core::make_smart_refctd_ptr<ICPUShader>(std::move(shader),ICPUShader::buffer_contains_glsl),
246+
ISpecializedShader::SInfo{nullptr, nullptr, "main", asset::ISpecializedShader::ESS_COMPUTE}
247+
);
248+
249+
auto gpuShader = driver->createGPUShader(nbl::core::smart_refctd_ptr<const ICPUShader>(cpuSpecializedShader->getUnspecialized()));
250+
251+
auto gpuSpecializedShader = driver->createGPUSpecializedShader(gpuShader.get(), cpuSpecializedShader->getSpecializationInfo());
252+
253+
return gpuSpecializedShader;
221254
}
222-
static inline void updateDescriptorSet_RemovePadding (
255+
static inline void updateDescriptorSet_LastFFT (
223256
video::IVideoDriver * driver,
224257
video::IGPUDescriptorSet * set,
225258
core::smart_refctd_ptr<video::IGPUBuffer> inputBufferDescriptor,
@@ -254,28 +287,6 @@ static inline void updateDescriptorSet_RemovePadding (
254287

255288
driver->updateDescriptorSets(2u, pWrites, 0u, nullptr);
256289
}
257-
static inline void dispatchHelper_RemovePadding(
258-
video::IVideoDriver* driver,
259-
const DispatchInfo_t& dispatchInfo)
260-
{
261-
driver->dispatch(dispatchInfo.workGroupCount[0], dispatchInfo.workGroupCount[1], dispatchInfo.workGroupCount[2]);
262-
COpenGLExtensionHandler::pGlMemoryBarrier(GL_SHADER_STORAGE_BARRIER_BIT);
263-
}
264-
static inline DispatchInfo_t getDispatchInfo_RemovePadding(
265-
asset::VkExtent3D const & inputDimensions)
266-
{
267-
DispatchInfo_t ret = {};
268-
269-
ret.workGroupDims[0] = 16;
270-
ret.workGroupDims[1] = 16;
271-
ret.workGroupDims[2] = 1;
272-
273-
ret.workGroupCount[0] = core::ceil(float(inputDimensions.width) / ret.workGroupDims[0]);
274-
ret.workGroupCount[1] = core::ceil(float(inputDimensions.height) / ret.workGroupDims[1]);
275-
ret.workGroupCount[2] = core::ceil(float(inputDimensions.depth) / ret.workGroupDims[2]);
276-
277-
return ret;
278-
}
279290

280291
int main()
281292
{
@@ -378,8 +389,8 @@ int main()
378389
outImgView = driver->createGPUImageView(IGPUImageView::SCreationParams(srcImgViewInfo));
379390
}
380391

381-
auto fftGPUSpecializedShader_SSBOInput = FFTClass::createShader(driver, FFTClass::DataType::SSBO, maxPaddedDimensionSize);
382-
auto fftGPUSpecializedShader_ImageInput = FFTClass::createShader(driver, FFTClass::DataType::TEXTURE2D, maxPaddedDimensionSize);
392+
auto fftGPUSpecializedShader_SSBOInput = FFTClass::createShader(driver, FFTClass::DataType::SSBO, maxPaddedDimensionSize, srcNumChannels);
393+
auto fftGPUSpecializedShader_ImageInput = FFTClass::createShader(driver, FFTClass::DataType::TEXTURE2D, maxPaddedDimensionSize, srcNumChannels);
383394
auto fftGPUSpecializedShader_KernelNormalization = FFTClass::createKernelNormalizationShader(driver, am);
384395

385396
auto fftPipelineLayout_SSBOInput = FFTClass::getDefaultPipelineLayout(driver, FFTClass::DataType::SSBO);
@@ -393,10 +404,14 @@ int main()
393404
auto fftDispatchInfo_Horizontal = FFTClass::buildParameters(paddedDim, FFTClass::Direction::X);
394405
auto fftDispatchInfo_Vertical = FFTClass::buildParameters(paddedDim, FFTClass::Direction::Y);
395406

396-
auto convolveShader = createShader_Convolution(driver, am, maxPaddedDimensionSize);
407+
auto convolveShader = createShader_Convolution(driver, am, maxPaddedDimensionSize, srcNumChannels);
397408
auto convolvePipelineLayout = getPipelineLayout_Convolution(driver);
398409
auto convolvePipeline = driver->createGPUComputePipeline(nullptr, core::smart_refctd_ptr(convolvePipelineLayout), std::move(convolveShader));
399410

411+
auto lastFFTShader = createShader_LastFFT(driver, am, maxPaddedDimensionSize, srcNumChannels);
412+
auto lastFFTPipelineLayout = getPipelineLayout_LastFFT(driver);
413+
auto lastFFTPipeline = driver->createGPUComputePipeline(nullptr, core::smart_refctd_ptr(lastFFTPipelineLayout), std::move(lastFFTShader));
414+
400415
// Allocate Output Buffer
401416
auto fftOutputBuffer_0 = driver->createDeviceLocalGPUBufferOnDedMem(FFTClass::getOutputBufferSize(paddedDim, srcNumChannels)); // result of: srcFFTX and kerFFTX and Convolution and IFFTY
402417
auto fftOutputBuffer_1 = driver->createDeviceLocalGPUBufferOnDedMem(FFTClass::getOutputBufferSize(paddedDim, srcNumChannels)); // result of: srcFFTY and IFFTX
@@ -449,16 +464,9 @@ int main()
449464
auto convolveDescriptorSet = driver->createGPUDescriptorSet(core::smart_refctd_ptr<const IGPUDescriptorSetLayout>(convolvePipelineLayout->getDescriptorSetLayout(0u)));
450465
updateDescriptorSet_Convolution(driver, convolveDescriptorSet.get(), fftOutputBuffer_0, fftOutputBuffer_KernelNormalized);
451466

452-
// IFFT X
453-
auto fftDescriptorSet_IFFT_X = driver->createGPUDescriptorSet(core::smart_refctd_ptr<const IGPUDescriptorSetLayout>(fftPipelineLayout_SSBOInput->getDescriptorSetLayout(0u)));
454-
FFTClass::updateDescriptorSet(driver, fftDescriptorSet_IFFT_X.get(), fftOutputBuffer_0, fftOutputBuffer_1);
455-
456-
auto removePaddingShader = createShader_RemovePadding(driver, am);
457-
auto removePaddingPipelineLayout = getPipelineLayout_RemovePadding(driver);
458-
auto removePaddingPipeline = driver->createGPUComputePipeline(nullptr, core::smart_refctd_ptr(removePaddingPipelineLayout), std::move(removePaddingShader));
459-
auto removePaddingDescriptorSet = driver->createGPUDescriptorSet(core::smart_refctd_ptr<const IGPUDescriptorSetLayout>(removePaddingPipelineLayout->getDescriptorSetLayout(0u)));
460-
updateDescriptorSet_RemovePadding(driver, removePaddingDescriptorSet.get(), fftOutputBuffer_1, outImgView);
461-
auto removePaddingDispatchInfo = getDispatchInfo_RemovePadding(outImageDim);
467+
// Last IFFTX
468+
auto lastFFTDescriptorSet = driver->createGPUDescriptorSet(core::smart_refctd_ptr<const IGPUDescriptorSetLayout>(lastFFTPipelineLayout->getDescriptorSetLayout(0u)));
469+
updateDescriptorSet_LastFFT(driver, lastFFTDescriptorSet.get(), fftOutputBuffer_0, outImgView);
462470

463471
uint32_t outBufferIx = 0u;
464472
auto lastPresentStamp = std::chrono::high_resolution_clock::now();
@@ -485,20 +493,13 @@ int main()
485493
FFTClass::pushConstants(driver, convolvePipelineLayout.get(), paddedDim, paddedDim, FFTClass::Direction::Y, false, srcNumChannels);
486494
FFTClass::dispatchHelper(driver, fftDispatchInfo_Vertical);
487495

488-
// Convolved IFFT X
489-
driver->bindComputePipeline(fftPipeline_SSBOInput.get());
490-
driver->bindDescriptorSets(EPBP_COMPUTE, fftPipelineLayout_SSBOInput.get(), 0u, 1u, &fftDescriptorSet_IFFT_X.get(), nullptr);
491-
FFTClass::pushConstants(driver, fftPipelineLayout_SSBOInput.get(), paddedDim, paddedDim, FFTClass::Direction::X, true, srcNumChannels);
496+
// Last FFT Padding and Copy to GPU Image
497+
driver->bindComputePipeline(lastFFTPipeline.get());
498+
driver->bindDescriptorSets(EPBP_COMPUTE, lastFFTPipelineLayout.get(), 0u, 1u, &lastFFTDescriptorSet.get(), nullptr);
499+
FFTClass::pushConstants(driver, lastFFTPipelineLayout.get(), paddedDim, paddedDim, FFTClass::Direction::X, true, srcNumChannels);
500+
driver->pushConstants(lastFFTPipelineLayout.get(), nbl::video::IGPUSpecializedShader::ESS_COMPUTE, sizeof(FFTClass::Parameters_t), sizeof(uint32_t) * 3, &kerDim); // numSrcChannels
492501
FFTClass::dispatchHelper(driver, fftDispatchInfo_Horizontal);
493502

494-
// Remove Padding and Copy to GPU Image
495-
driver->bindComputePipeline(removePaddingPipeline.get());
496-
driver->bindDescriptorSets(EPBP_COMPUTE, removePaddingPipelineLayout.get(), 0u, 1u, &removePaddingDescriptorSet.get(), nullptr);
497-
driver->pushConstants(removePaddingPipelineLayout.get(), nbl::video::IGPUSpecializedShader::ESS_COMPUTE, 0u, sizeof(uint32_t) * 3, &paddedDim); // pc.numChannels
498-
driver->pushConstants(removePaddingPipelineLayout.get(), nbl::video::IGPUSpecializedShader::ESS_COMPUTE, sizeof(uint32_t) * 4, sizeof(uint32_t) * 3, &kerDim); // numSrcChannels
499-
driver->pushConstants(removePaddingPipelineLayout.get(), nbl::video::IGPUSpecializedShader::ESS_COMPUTE, sizeof(uint32_t) * 8, sizeof(uint32_t), &srcNumChannels); // numSrcChannels
500-
dispatchHelper_RemovePadding(driver, removePaddingDispatchInfo);
501-
502503
if(false == savedToFile) {
503504
savedToFile = true;
504505

include/nbl/builtin/glsl/ext/FFT/default_compute_fft.comp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77
#error "USE_SSBO_FOR_INPUT should be defined."
88
#endif
99

10+
#ifndef _NBL_GLSL_EXT_FFT_MAX_CHANNELS
11+
#define _NBL_GLSL_EXT_FFT_MAX_CHANNELS 4
12+
#endif
13+
1014
#ifndef _NBL_GLSL_EXT_FFT_WORKGROUP_SIZE_
1115
#define _NBL_GLSL_EXT_FFT_WORKGROUP_SIZE_ 256
1216
#endif

include/nbl/builtin/glsl/ext/FFT/fft.glsl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
#include <nbl/builtin/glsl/math/functions.glsl>
1313
#include <nbl/builtin/glsl/ext/FFT/parameters.glsl>
1414

15+
#ifndef _NBL_GLSL_EXT_FFT_MAX_CHANNELS
16+
#error "_NBL_GLSL_EXT_FFT_MAX_CHANNELS should be defined."
17+
#endif
1518

1619
#ifndef _NBL_GLSL_EXT_FFT_MAX_DIM_SIZE_
1720
#error "_NBL_GLSL_EXT_FFT_MAX_DIM_SIZE_ should be defined."
@@ -162,7 +165,6 @@ void nbl_glsl_ext_FFT(bool is_inverse)
162165
uint leadingZeroes = nbl_glsl_clz(dataLength) + 1u;
163166
uint logTwo = 32u - leadingZeroes;
164167

165-
const uint _NBL_GLSL_EXT_FFT_MAX_CHANNELS = 4;
166168
const uint numChannels = nbl_glsl_ext_FFT_Parameters_t_getNumChannels();
167169

168170
nbl_glsl_complex even_values[_NBL_GLSL_EXT_FFT_MAX_ITEMS_PER_THREAD][_NBL_GLSL_EXT_FFT_MAX_CHANNELS]; // should be half the prev version

include/nbl/ext/FFT/FFT.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ class FFT : public core::TotalInterface
117117
return (paddedInputDimensions.width * paddedInputDimensions.height * paddedInputDimensions.depth * numChannels) * (sizeof(float) * 2);
118118
}
119119

120-
static core::smart_refctd_ptr<video::IGPUSpecializedShader> createShader(video::IVideoDriver* driver, DataType inputType, uint32_t maxDimensionSize);
120+
static core::smart_refctd_ptr<video::IGPUSpecializedShader> createShader(video::IVideoDriver* driver, DataType inputType, uint32_t maxDimensionSize, uint32_t maxNumChannels);
121121

122122
_NBL_STATIC_INLINE_CONSTEXPR uint32_t MAX_DESCRIPTOR_COUNT = 2u;
123123
static inline void updateDescriptorSet(

0 commit comments

Comments
 (0)