GS/OpenGL: Fix potentially-incorrect line width

This commit is contained in:
Stenzek authored and Connor McLaughlin committed 2023-06-30 23:06:51 +10:00
1 parent e52766d047
commit 78e20868df
2 files changed
+8 -5

No files matched your search

+7 -4
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)
+1 -1
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;