-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Support renderer fast presents #7147
Comments
Huh, I like the idea. I know that we've been tossing around ideas for making the retro effect work with differential drawing for a bit now, but this might be cleaner. I'm gonna summon @miniksa to get his thoughts on your spec (and fork), since he's our rendering expert |
Hi. Anyone had a chance to look at the proposal? |
I'll read this today. Sorry for the delay. |
I like the initial proposal. I'm not sure where the assertion that the existing slow workflow is too slow for 60fps comes from. Is that specifically in the context of when a shader is applied? I don't think I've seen the partial rendering stalling us below 60fps on my machine for simple text... I don't mind the texture idea. It's not a problem if we use MORE of DX11 than before. The whole point of moving to DX was that we'd use more and more of it over time anyway. Also, having a sort of backing buffer that is drawn to and then composing it on the front is fine. I think I did something like that in the GDI renderer. Regarding the proposed impl:
For the fast present impl: Finally, we should continue to use |
WRT to Present1. I don't think Present1 is compatible with full screen shader effects but it could be possible to retain the current workflow and then have a separate workflow when shaders enabled. However, the drawback would be increased code-complexity. With fullscreen refresh needed for the current implementation of how shaders are enabled it feels that repainting the full frame and then apply a destructive shader effect on the full frame feels like it unnecessary wasteful compared to just applying a pixel shader on a pre existing texture. With that said I only have Debug built on my machine (disk space issues) and Debug is kind of sluggish at least for me. Retaining the existing workflow and having a separate flow for pixel shaders is a significant change and it will take me some time to produce a working prototype. |
It's okay if
So having it bifurcated to support both user personas is likely what we need. Also, we do not consider a Debug build as a valid measure of performance characteristics of the Terminal. There are a TON of debug-only logging, tracing, and guard mechanisms that are stripped out on Release. Additionally, the optimizer does quite a bit of work on our codebase that just isn't present in Debug builds. I would very much recommend that you use Release for performance profiling and Debug just for diagnostics, debugging, and trace purposes. Finally, I agree with you. The destructiveness of the shader effect isn't something I was ever in favor of, but it was a code contribution from outside our core team. And I wasn't willing to hold up going from nothing to something over those details at the time. This is much of why we classified the feature in the |
I aware that DEBUG in C++ is very sluggish compared to RELEASE and I agree it's not a good measurement for good reasons. However, as this is at a conceptual stage currently I haven't bothered to do proper measurement. I guess I shouldn't have mentioned the performance reason without facts. |
When it comes to |
We don't really have an issue open already for "re-enable differential drawing when shaders are enabled", do we? I suppose this is the closest one. I probably should have read this thread closer before I tried messing with the shaders yesterday ( |
As mentioned in #7147, there's a better way of doing shader presenting. This seems about right for when the shader effect is enabled. It's hard to tell if this is actually working well or not though. Maybe need to try another shader. When the shader is disabled, this absolutely doesn't work.
I'm trying this out this week, and it's really close to working. I'm getting caught up in the scrolling bit though - I definitely don't want to do the @mrange do you have any pointers for how to do the
thing you mentioned? Any pointers would be immensely helpful 😄 My WIP branch is |
Nevermind, I figured it out. I made two incredibly embarrassing mistakes
That's what I get for trying to write code with a head cold. It works now, and works well. I'm pretty confident you could leave shaders on all the time and not feel the pain with these changes. It even works acceptably to have So now |
With #13885 in place, our new text renderer can handle this situation now. Since shading on the GPU is fast, it simply redraws the entire screen on every frame. Sounds slow? With the retro shader enabled rendering my entire 4K monitor worth of content 144 times per second takes up about 2-5% of my GPU load. |
Description of the new feature/enhancement
The current renderer has a complex workflow in order to render a frame. If one are looking into providing animated backgrounds or terminal effects that require high FPS rates the process is too slow especially since terminal effects disables partial (faster) repaints.
In addition; in
DxRenderer.cpp
there is lot of copying back-n-forth between forward and back buffer to enable partial updates and terminal effects.This proposal is to:
DxRenderer
.I realize this is probably not high on the list of "need to" stuff but if the retro terminal effects is a thing I think it makes sense to make it render fast enough to support other cool scenarios.
Proposed technical implementation details (optional)
Proposed design
The text was updated successfully, but these errors were encountered: