diff options
| author | TellowKrinkle <tellowkrinkle@gmail.com> | 2022-07-23 00:47:04 -0500 |
|---|---|---|
| committer | TellowKrinkle <tellowkrinkle@gmail.com> | 2022-10-22 20:13:24 -0500 |
| commit | 68f49df0f8a845eecd1e65c4d75dfbee3bdc989e (patch) | |
| tree | 95fd1e84279cba083fa8e776ba439b59ad7503a7 /Source/Core/VideoCommon/GeometryShaderManager.cpp | |
| parent | 804e42150e03532e63ecc5a7f6f6eed751a132af (diff) | |
VideoCommon: Add vertex shader point and line expansion
Diffstat (limited to 'Source/Core/VideoCommon/GeometryShaderManager.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/GeometryShaderManager.cpp | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/Source/Core/VideoCommon/GeometryShaderManager.cpp b/Source/Core/VideoCommon/GeometryShaderManager.cpp index f71a687ce8..459df67868 100644 --- a/Source/Core/VideoCommon/GeometryShaderManager.cpp +++ b/Source/Core/VideoCommon/GeometryShaderManager.cpp @@ -8,6 +8,7 @@ #include "Common/ChunkFile.h" #include "Common/CommonTypes.h" #include "VideoCommon/BPMemory.h" +#include "VideoCommon/RenderState.h" #include "VideoCommon/VideoConfig.h" #include "VideoCommon/XFMemory.h" @@ -36,10 +37,22 @@ void GeometryShaderManager::Dirty() // Any constants that can changed based on settings should be re-calculated s_projection_changed = true; + // Uses EFB scale config + SetLinePtWidthChanged(); + dirty = true; } -void GeometryShaderManager::SetConstants() +static void SetVSExpand(VSExpand expand) +{ + if (GeometryShaderManager::constants.vs_expand != expand) + { + GeometryShaderManager::constants.vs_expand = expand; + GeometryShaderManager::dirty = true; + } +} + +void GeometryShaderManager::SetConstants(PrimitiveType prim) { if (s_projection_changed && g_ActiveConfig.stereo_mode != StereoMode::Off) { @@ -63,6 +76,16 @@ void GeometryShaderManager::SetConstants() dirty = true; } + if (g_ActiveConfig.UseVSForLinePointExpand()) + { + if (prim == PrimitiveType::Points) + SetVSExpand(VSExpand::Point); + else if (prim == PrimitiveType::Lines) + SetVSExpand(VSExpand::Line); + else + SetVSExpand(VSExpand::None); + } + if (s_viewport_changed) { s_viewport_changed = false; |
