yuzu-emu
/
yuzu-mainline
Archived
1
0
Fork 0

gl_rasterizer: Only apply polygon offset clamp if enabled

This commit is contained in:
ReinUsesLisp 2020-01-02 22:42:56 -03:00
parent 2eeea90713
commit 62437943a7
1 changed files with 6 additions and 3 deletions

View File

@ -1312,10 +1312,13 @@ void RasterizerOpenGL::SyncPolygonOffset() {
oglEnable(GL_POLYGON_OFFSET_LINE, regs.polygon_offset_line_enable); oglEnable(GL_POLYGON_OFFSET_LINE, regs.polygon_offset_line_enable);
oglEnable(GL_POLYGON_OFFSET_POINT, regs.polygon_offset_point_enable); oglEnable(GL_POLYGON_OFFSET_POINT, regs.polygon_offset_point_enable);
if (regs.polygon_offset_fill_enable || regs.polygon_offset_line_enable ||
regs.polygon_offset_point_enable) {
// Hardware divides polygon offset units by two // Hardware divides polygon offset units by two
glPolygonOffsetClamp(regs.polygon_offset_factor, regs.polygon_offset_units / 2.0f, glPolygonOffsetClamp(regs.polygon_offset_factor, regs.polygon_offset_units / 2.0f,
regs.polygon_offset_clamp); regs.polygon_offset_clamp);
} }
}
void RasterizerOpenGL::SyncAlphaTest() { void RasterizerOpenGL::SyncAlphaTest() {
auto& gpu = system.GPU().Maxwell3D(); auto& gpu = system.GPU().Maxwell3D();