![]() ![]() So when you call glGetTexImage on an image you have rendered to, the GPU must conclude that rendering process in its entirety, then copy the rendered data into your memory.ĭespite the fact that you have different threads sending work to the GPU, the GPU itself may only be able to do one set of work at any particular time. If anyone has any ideas what's going on or knows of any good debugging tools that will diagnose what's blocking the call I'd really appreciate it.Īny OpenGL function which takes a pointer to client memory must be finished accessing that pointer before returning control to your CPU. I tried using DirectX11 and Vulkan for the Unreal Engine renderer and they both cause the same problem. It could be a side effect based on how my graphics driver works or something. The two renderers are completely mutually exclusive in their operation I'm really not sure how one can effect the operation of another. I don't know what mechanism is in play that stops the call to glGetTexImage until Unreal Engine has rendered one or two frames. I don't really expect any one to know what's going wrong here exactly if you have any ideas though or advice I'd be greatful to hear it. Thread that is a frame or two behind the game thread. In Unreal Engine 4 (UE4), the entire renderer operates in its own I know that in Unreal Engines documentation it says that Based on the graph it looks like glGetTexImage is stalled until about one or two frames are rendered. In this example I'm totally GPU bound the game thread is just stalling for the render thread according to the profiler (not shown). The Blue line is the time it takes the gamethread to process a frame and the redline is the time it takes the render thread to process a frame. The green graph is my call to glGetTexImage. The y-axis is the time each call takes in milliseconds and the x-axis is realtime. I think it has something to do with how the engine synchronizes with the rendering thread. I am using a separate renderer and thread than Unreal Engine is using so I figure it wouldn't conflict. Something is blocking my call to glGetTexImage (copies a texture from gpu memory to cpu memory) in Unreal Engine. Here is the code in question if you really want to go deep. The issue I'm having happens when I read the framebuffer from the GPU memory using glGetTexImage. I am using OpenGL to render content from an emulator and then I read the framebuffer from the GPU memory and write it to the CPU. This question is a bit abstract, but I am pretty stumped here so I figured I'd ask.
0 Comments
Leave a Reply. |