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); glDisable(GL_PROGRAM_POINT_SIZE);
GLState::point_size = point_size_enabled; GLState::point_size = point_size_enabled;
} }
const float line_width = config.line_expand ? static_cast<float>(GSConfig.UpscaleMultiplier) : 1.0f; if (config.topology == GSHWDrawConfig::Topology::Line)
if (GLState::line_width != line_width)
{ {
GLState::line_width = line_width; const float line_width = config.line_expand ? config.cb_ps.ScaleFactor.z : 1.0f;
glLineWidth(line_width); if (GLState::line_width != line_width)
{
GLState::line_width = line_width;
glLineWidth(line_width);
}
} }
if (config.destination_alpha == GSHWDrawConfig::DestinationAlphaMode::PrimIDTracking) if (config.destination_alpha == GSHWDrawConfig::DestinationAlphaMode::PrimIDTracking)

View File

@ -3618,7 +3618,7 @@ void GSDeviceVK::RenderHW(GSHWDrawConfig& config)
SetBlendConstants(config.blend.constant); SetBlendConstants(config.blend.constant);
if (config.topology == GSHWDrawConfig::Topology::Line) 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. // Primitive ID tracking DATE setup.
GSTextureVK* date_image = nullptr; GSTextureVK* date_image = nullptr;