@@ -698,7 +698,7 @@ class FFTBloomApp final : public examples::SimpleWindowedApplication, public app
698698// Compute required WorkgroupSize and ElementsPerThread for FFT
699699// Remember we assume kernel is square!
700700
701- auto [elementsPerInvocationLog2, workgroupSizeLog2] = workgroup::fft::optimalFFTParameters (m_device->getPhysicalDevice ()->getLimits ().maxWorkgroupSize [ 0 ] , kerDim.width );
701+ auto [elementsPerInvocationLog2, workgroupSizeLog2] = workgroup::fft::optimalFFTParameters (m_device->getPhysicalDevice ()->getLimits ().maxOptimallyResidentWorkgroupInvocations , kerDim.width );
702702// Normalization shader needs this info
703703uint16_t secondAxisFFTHalfLengthLog2 = elementsPerInvocationLog2 + workgroupSizeLog2 - 1 ;
704704// Create shaders
@@ -878,7 +878,7 @@ class FFTBloomApp final : public examples::SimpleWindowedApplication, public app
878878uint16_t firstAxisFFTWorkgroupSizeLog2;
879879smart_refctd_ptr<IGPUShader> shaders[3 ];
880880{
881- auto [elementsPerInvocationLog2, workgroupSizeLog2] = workgroup::fft::optimalFFTParameters (m_device->getPhysicalDevice ()->getLimits ().maxWorkgroupSize [ 0 ] , m_marginSrcDim.height );
881+ auto [elementsPerInvocationLog2, workgroupSizeLog2] = workgroup::fft::optimalFFTParameters (m_device->getPhysicalDevice ()->getLimits ().maxOptimallyResidentWorkgroupInvocations , m_marginSrcDim.height );
882882SShaderConstevalParameters::SShaderConstevalParametersCreateInfo shaderConstevalInfo = { .useHalfFloats = m_useHalfFloats, .elementsPerInvocationLog2 = elementsPerInvocationLog2, .workgroupSizeLog2 = workgroupSizeLog2 };
883883SShaderConstevalParameters shaderConstevalParameters (shaderConstevalInfo);
884884shaders[0 ] = createShader (" app_resources/image_fft_first_axis.hlsl" , shaderConstevalParameters);
@@ -892,7 +892,7 @@ class FFTBloomApp final : public examples::SimpleWindowedApplication, public app
892892
893893// Second axis FFT might have different dimensions
894894{
895- auto [elementsPerInvocationLog2, workgroupSizeLog2] = workgroup::fft::optimalFFTParameters (m_device->getPhysicalDevice ()->getLimits ().maxWorkgroupSize [ 0 ] , m_marginSrcDim.width );
895+ auto [elementsPerInvocationLog2, workgroupSizeLog2] = workgroup::fft::optimalFFTParameters (m_device->getPhysicalDevice ()->getLimits ().maxOptimallyResidentWorkgroupInvocations , m_marginSrcDim.width );
896896// Compute kernel half pixel size
897897const auto & kernelSpectraExtent = m_kernelNormalizedSpectrums->getCreationParameters ().image ->getCreationParameters ().extent ;
898898float32_t2 kernelHalfPixelSize{ 0 .5f ,0 .5f };
0 commit comments