Villacaleb / slimdx

Automatically exported from code.google.com/p/slimdx
MIT License
0 stars 0 forks source link

FastFourierTransform parameter validation inconsistency #842

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When using the AttachBuffersAndPrecompute function on the Direct3D11 FFT 
interface, SlimDX does the following parameter validation:

if (tempBuffers == nullptr) throw gcnew 
ArgumentNullException("temporaryBuffers");
if (precomputeBuffers == nullptr) throw gcnew 
ArgumentNullException("precomputeBuffers");

if (tempBuffers->Length == 0 || tempBuffers->Length > 
D3DX11_FFT_MAX_TEMP_BUFFERS) throw gcnew 
ArgumentOutOfRangeException("temporaryBuffers");
if (precomputeBuffers->Length == 0 || precomputeBuffers->Length > 
D3DX11_FFT_MAX_PRECOMPUTE_BUFFERS) throw gcnew 
ArgumentOutOfRangeException("precomputeBuffers");

Unfortunately, D3DX11_FFT_MAX_PRECOMPUTE_BUFFERS can be zero, which causes the 
function to always fail and the interface to be unusable.

Version: March 2011

Original issue reported on code.google.com by thomas.b...@gmail.com on 22 Oct 2011 at 1:15

GoogleCodeExporter commented 9 years ago
I meant BufferRequirements.PrecomputeBufferCount instead of 
D3DX11_FFT_MAX_PRECOMPUTE_BUFFERS, my bad.

Original comment by thomas.b...@gmail.com on 22 Oct 2011 at 11:39

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r2151.

Original comment by Mike.Popoloski on 15 Nov 2011 at 7:39