Direct3D & OpenCL & pixel shaders cooperation problem

Discussion created by vpupkin on Nov 1, 2018
Latest reply on Nov 25, 2018 by vpupkin


I'm a simple user, not a developer, but I need help on an issue that requires a developer's level of expertise.


Briefly, I'm running a program that is using Direct3D, OpenCL and pixel shaders at the same time. Cooperation of these 3 entities leads to a critical decrease of performance, which begins a couple of minutes after the program startup.


Now, the details. I'm running a video player with a frame interpolator and a 3rd party video renderer attached to it. The frame interpolator uses OpenCL for its functioning and the renderer uses Direct3D9. In addition to that, certain image processing algorithms in the renderer are implemented as pixel shaders, so when you activate them, shaders also start running.


But when I activate these shaders, a trouble happens. For the first couple of minutes the player runs smoothly, but after that CPU load suddenly rises and the renderer starts dropping frames of video. I know it's the renderer because it shows on screen statistics with the renderer frame queue among them, and the queue gets almost empty at that moment. There's also the decoder queue, which precedes rendering queue, and sometimes it gets empty too.


I've been trying to solve the problem by switching different settings, but it's useless, which leads me to the conclusion that source of the problem lies on a lower level than the programs themselves, I guess in the APIs. As the trouble doesn't begin at once, I presume that there is some memory buffer somewhere in this chain, which starts to fill with movie playback beginning and when it overflows, frames start dropping.


I need to track the source of this problem. If these symptoms give you an idea of what's going on, tell me. If not, tell me what tools can make a low-level diagnostics to find the source and how to use them for this purpose. I've already tried running CodeXL on the player's process, but somewhy it's not able to capture OpenCL calls, like they are not there.


If you need additional information, tell me.