mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
VideoCommon: Add vertex shader point and line expansion
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user