GS/OpenGL: Fix potentially-incorrect line width

This commit is contained in:
Stenzek 2023-06-30 21:28:53 +10:00 committed by Connor McLaughlin
parent e52766d047
commit 78e20868df
2 changed files with 8 additions and 5 deletions

View File

@ -2360,11 +2360,14 @@ void GSDeviceOGL::RenderHW(GSHWDrawConfig& config)
glDisable(GL_PROGRAM_POINT_SIZE);
GLState::point_size = point_size_enabled;
}
const float line_width = config.line_expand ? static_cast<float>(GSConfig.UpscaleMultiplier) : 1.0f;
if (GLState::line_width != line_width)
if (config.topology == GSHWDrawConfig::Topology::Line)
{
GLState::line_width = line_width;
glLineWidth(line_width);
const float line_width = config.line_expand ? config.cb_ps.ScaleFactor.z : 1.0f;
if (GLState::line_width != line_width)
{
GLState::line_width = line_width;
glLineWidth(line_width);
}
}
if (config.destination_alpha == GSHWDrawConfig::DestinationAlphaMode::PrimIDTracking)

View File

@ -3618,7 +3618,7 @@ void GSDeviceVK::RenderHW(GSHWDrawConfig& config)
SetBlendConstants(config.blend.constant);
if (config.topology == GSHWDrawConfig::Topology::Line)
SetLineWidth(config.cb_ps.ScaleFactor.z);
SetLineWidth(config.line_expand ? config.cb_ps.ScaleFactor.z : 1.0f);
// Primitive ID tracking DATE setup.
GSTextureVK* date_image = nullptr;