-
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
AtlasEngine: Minor bug fixes #16219
AtlasEngine: Minor bug fixes #16219
Conversation
{ | ||
// Depending on the version of the d3dcompiler_*.dll, the next two functions either return nullptr | ||
// on failure or an instance of CInvalidSRConstantBuffer or CInvalidSRVariable respectively, | ||
// which cause GetDesc() to return E_FAIL. In other words, we have to assume that any failure in the |
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.
That doesn't seem like what this code does?
This code only changes _requiresContinuous...
when we successfully get all the buffers, variables, and descriptors.
Therefore, we just use whatever value was previously set. Isn't that worse?
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.
My answer to all 3 comments is: If you expand the section above this diff, you'll see that it resets all relevant members before making any further changes (including _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.
UGH thanks. Sorry for the bad code.
// If the user asks for ClearType, but also for a transparent background | ||
// (which our ClearType shader doesn't simultaneously support) | ||
// then we need to sneakily force the renderer to grayscale AA. | ||
const auto antialiasingMode = _api.enableTransparentBackground && _api.antialiasingMode == AntialiasingMode::ClearType ? AntialiasingMode::Grayscale : _api.antialiasingMode; | ||
const bool enableTransparentBackground = _api.enableTransparentBackground || !_api.s->misc->customPixelShaderPath.empty() || _api.s->misc->useRetroTerminalEffect; |
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.
_api.s->misc->useRetroTerminalEffect
is completely gone now. Is that intentional?
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.
Yep! It's the 3rd bullet point in the commit message. 😅
oh it was a rebuild. ugh sorry. |
This commit fixes 4 minor bugs: * Forgot to set the maximum swap chain latency. Without it, it defaults to up to 3 frames of latency. We don't need this, because our renderer is simple and fast and is expected to draw frames within <1ms. * ClearType treats the alpha channel as ignored, whereas custom shaders can manipulate the alpha channel freely. This meant that using both simultaneously would produce weird effects, like text having black background. We now force grayscale AA instead. * The builtin retro shader should not be effected by the previous point. * When the cbuffer is entirely unused in a custom shader, it has so far resulted in constant redraws. This happened because the D3D reflection `GetDesc` call will then return `E_FAIL` in this situation. The new code on the other hand will now assume that a failure to get the description is equal to the variable being unused. Closes #15960 ## Validation Steps Performed * A custom passthrough shader works with grayscale and ClearType AA while also changing the opacity with Ctrl+Shift+Scroll ✅ * Same for the builtin retro shader, but ClearType works ✅ * The passthrough shader doesn't result in constant redrawing ✅ (cherry picked from commit 0289cb0) Service-Card-Id: 90915276 Service-Version: 1.18
This commit fixes 4 minor bugs: * Forgot to set the maximum swap chain latency. Without it, it defaults to up to 3 frames of latency. We don't need this, because our renderer is simple and fast and is expected to draw frames within <1ms. * ClearType treats the alpha channel as ignored, whereas custom shaders can manipulate the alpha channel freely. This meant that using both simultaneously would produce weird effects, like text having black background. We now force grayscale AA instead. * The builtin retro shader should not be effected by the previous point. * When the cbuffer is entirely unused in a custom shader, it has so far resulted in constant redraws. This happened because the D3D reflection `GetDesc` call will then return `E_FAIL` in this situation. The new code on the other hand will now assume that a failure to get the description is equal to the variable being unused. Closes #15960 ## Validation Steps Performed * A custom passthrough shader works with grayscale and ClearType AA while also changing the opacity with Ctrl+Shift+Scroll ✅ * Same for the builtin retro shader, but ClearType works ✅ * The passthrough shader doesn't result in constant redrawing ✅ (cherry picked from commit 0289cb0) Service-Card-Id: 90915277 Service-Version: 1.19
This commit fixes 4 minor bugs: * Forgot to set the maximum swap chain latency. Without it, it defaults to up to 3 frames of latency. We don't need this, because our renderer is simple and fast and is expected to draw frames within <1ms. * ClearType treats the alpha channel as ignored, whereas custom shaders can manipulate the alpha channel freely. This meant that using both simultaneously would produce weird effects, like text having black background. We now force grayscale AA instead. * The builtin retro shader should not be effected by the previous point. * When the cbuffer is entirely unused in a custom shader, it has so far resulted in constant redraws. This happened because the D3D reflection `GetDesc` call will then return `E_FAIL` in this situation. The new code on the other hand will now assume that a failure to get the description is equal to the variable being unused. Closes #15960 ## Validation Steps Performed * A custom passthrough shader works with grayscale and ClearType AA while also changing the opacity with Ctrl+Shift+Scroll ✅ * Same for the builtin retro shader, but ClearType works ✅ * The passthrough shader doesn't result in constant redrawing ✅ (cherry picked from commit 0289cb0) Service-Card-Id: 90915276 Service-Version: 1.18
- AtlasEngine: Minor bug fixes (GH-16219) - Fix the fix for the fix of nearby font loading (GH-16196) - Added selectionBackground to light color schemes (GH-16243) - Another theoretical fix for a crash (GH-16267) - Fix tabs being printed in cmd.exe prompts (GH-16273) Related work items: MSFT-47266988
This commit fixes 4 minor bugs:
to up to 3 frames of latency. We don't need this, because our renderer
is simple and fast and is expected to draw frames within <1ms.
can manipulate the alpha channel freely. This meant that using both
simultaneously would produce weird effects, like text having black
background. We now force grayscale AA instead.
resulted in constant redraws. This happened because the D3D reflection
GetDesc
call will then returnE_FAIL
in this situation.The new code on the other hand will now assume that a failure
to get the description is equal to the variable being unused.
Closes #15960
Validation Steps Performed
while also changing the opacity with Ctrl+Shift+Scroll ✅