2 years ago

#59054

test-img

Ben

Direct2D1 being throttled due to resource intensive 3d app running

So this is a very curious issue I've come across, and to start, there is another stackoverflow question along similar lines that is unanswered:

DirectX 11 application slows down dramatically when not foreground application

The suggested answer of disabling Windows Game Mode (essentially prioritizes foreground applications) does not seem to affect this to a great degree.

Here's the issue:

When I call EndDraw, execution is stalled on average 5-70ms if the application is not in foreground. The severity of this is random. For instance, my application will maintain an average render time of around 5ms, but it will spike to 15, 20, 25, etc. When the application is in foreground, it will remain a constant 5ms.

How can I prioritize my application and my draws over another applications (such as a game). I have found zero documentation of throttling and prioritization of Direct2d1 devices outside of SetRenderingPriority, which consists of two pointless paramters (regular or low, no option for high), and one undocumented "force dword" parameter, as well as a vague reference to other throttling that may occur. There is no documentation for D2D1_RENDERING_PRIORITY_FORCE_DWORD anywhere (just google it verbatim), and it does not appear to make a difference anyways.This just makes the enum DWORD size, whoops.

To add additional information, changing the presentation method (such as immediate, and none [which waits for the display to refresh]) does not seem to affect this either.

directx

direct2d

0 Answers

Your Answer

Accepted video resources