-
Notifications
You must be signed in to change notification settings - Fork 8.5k
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
Teach the renderer to keep thread alive if engine requests it #9091
Conversation
… that it wants it so continuous draw shaders can keep drawing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is GREAT. I don't think there's a way to be sure if a shader is actually using the Time
variable or not - we'd somehow need to inspect the compiled shader to see if the variable was ever referenced? There's no way that's possible.
Lets
// If the engine tells us it really wants to redraw immediately, | ||
// tell the thread so it doesn't go to sleep and ticks again | ||
// at the next opportunity. | ||
if (pEngine->RequiresContinuousRedraw()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh my gosh this is so clever, I love it
TODO
|
nit: reword title to be imperative; pretend it completes the sentence "this commit will" |
Clever as. |
Teaches renderer base to keep thread alive if engine requests it. `DxEngine` now requests it if shaders are on. - The render engine interface now has a true/false to return whether the specific renderer wants another frame to immediately follow up. The renderer base will ask for this information as it ends the paint on any particular engine (which is the time where invalid regions are typically cleaned up) and just poke the render thread the same as if an invalidation request came in from outside of render-land. That will trigger the render thread to just keep moving in the same way as any other invalidation. ## Validation Steps Performed - [x] Actually built it - [x] Actually try it I promised this in #8994 (cherry picked from commit 3b24781)
Dustin L. Howett (3) * Move CharToKeyEvents (and friends) into InteractivityBase (GH-9106) * Update Cascadia Code to 2102.03 (GH-9088) * verison: bump to 1.7 on main Josh Soref (1) * ci: update to Spell check to 0.0.17a (CC-9014) Leonard Hecker (3) * Fixed GH-5205: Ctrl+Alt+2 doesn't send ^[^@ (CC-5272) * Fix issues in tests.xml and OpenConsole.psm1 (CC-9011) * Fix GH-8458: Handle all Ctrl-key combinations (CC-8870) Mike Griese (1) * Add support for running a commandline in another WT window (GH-8898) Michael Niksa (1) * Teach the renderer to keep thread alive if engine requests it (GH-9091) Lachlan Picking (1) * Fix shader time input (CC-8994) PankajBhojwani (1) * Separate runtime TerminalSettings from profile-TerminalSettings (CC-8602) Chester Liu (2) * Add support for paste filtering and bracketed paste mode (CC-9034) * Add support for chaining OSC 10-12 (CC-8999) Related work items: MSFT-31692939
🎉 Handy links: |
Teaches renderer base to keep thread alive if engine requests it.
DxEngine
now requests it if shaders are on.specific renderer wants another frame to immediately follow up. The
renderer base will ask for this information as it ends the paint on
any particular engine (which is the time where invalid regions are
typically cleaned up) and just poke the render thread the same as if
an invalidation request came in from outside of render-land. That will
trigger the render thread to just keep moving in the same way as any
other invalidation.
Validation Steps Performed
I promised this in #8994