The simple_encode_d3d_async sample does
EncRequest.NumFrameSuggested = EncRequest.NumFrameSuggested + mfxEncParams.AsyncDepth;
to determine how many surfaces to create. But if you call QueryIOSurf with a larger AsyncDepth, it returns a larger NumFrameSuggested, suggesting it already accounts for AsyncDepth internally. In my testing, the original value of NumFrameSuggested is insufficient and makes my program run out of surfaces. Adding a single surface seems to fix this.
How many surfaces should I create?
Bruno