-
Notifications
You must be signed in to change notification settings - Fork 8.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DxEngine::WaitUntilCanRender() should not have a hard Sleep() #13268
Comments
There's a lot to unpack here and it's almost the weekend, so sorry for the delays in a longer, better response. It's important to know that most of the stack here has evolved very organically over the course of the last decade. The GDI engine came from the collection of disparate draw calls all over the codebase. The DX engine came from the GDI engine and (some other internal dx renderer that worked well enough). The DX engine was hacked together for conhost long before Terminal even existed. IIRC, the original sleep is descended from the GDI engine where yea, the rendering needs to happen on the CPU. There was certainly a point in that engine where trying to repaint more often than 1/60s did create a detrimental impact on the throughput. The way it existed originally, there was only ever a Renderer and a GdiEngine, and the Sleep was originally in the Renderer. Many refactors later left that in the DxEngine, which we might be able to just get rid on now, yea. I believe we once experimented with syncing the DxEngine's frames to the v-sync. That was for #649. The original experiment didn't pan out from what I remember, and we haven't really revisited since. We could probably try that again here, in place of the Sleep(). Overall, I think a lot of what you've mentioned here is stuff that we're hoping to address with the new atlas renderer. Especially changing the renderer interface to give the engine a snapshot of the viewport's contents. That's one of the big things we're hoping to expose around the #8000 timeframe. |
FYI you can find it here: https://github.com/microsoft/terminal/tree/main/src/renderer/atlas If you or anyone else has any tips, advice, or just feedback for the newer AtlasEngine, that'd be absolutely amazing! |
Alrighty so we discussed this as a team yesterday. Turns out, if you totally remove that Thanks! |
terminal/src/renderer/dx/DxRenderer.cpp
Line 1512 in c754f4d
I work as an engine/graphics programmer in the games industry and seeing this causes some amount of stress. I've gone through a bit of the rendering code and I have a couple of observations, for whatever they're worth:
The text was updated successfully, but these errors were encountered: