diff options
| author | JMC47 <JMC4789@gmail.com> | 2022-10-23 01:49:26 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-10-23 01:49:26 -0400 |
| commit | cdcbe51b2a0c4dd78ab8d1d3ad38d8ab2947405b (patch) | |
| tree | 5d29d92713f591f003b7d83da63b427b3c847ea1 /Source/Core/VideoCommon/GeometryShaderManager.cpp | |
| parent | 06bd0a908692f61702a483c51c93fadb2ed7eefc (diff) | |
| parent | 1e9b6f88e4c13722a2a47aeb0d54df95c3a07c69 (diff) | |
Merge pull request #10890 from tellowkrinkle/VertexLineExpand
VideoCommon: Add vertex shader point/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; |
