VideoCommon: Add vertex shader point and line expansion

This commit is contained in:
TellowKrinkle
2022-07-23 00:47:04 -05:00
parent 804e42150e
commit 68f49df0f8
17 changed files with 584 additions and 73 deletions

View File

@ -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;