From 7677d6ea9f3182346aefec85c5246fed3bf4076b Mon Sep 17 00:00:00 2001 From: Ben Vanik Date: Sun, 22 Mar 2015 15:30:36 -0700 Subject: [PATCH] Depth range. --- src/xenia/gpu/gl4/command_processor.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/xenia/gpu/gl4/command_processor.cc b/src/xenia/gpu/gl4/command_processor.cc index 8ad07fdfe..43669624b 100644 --- a/src/xenia/gpu/gl4/command_processor.cc +++ b/src/xenia/gpu/gl4/command_processor.cc @@ -406,7 +406,7 @@ bool CommandProcessor::SetupGL() { } glEnable(GL_SCISSOR_TEST); - glClipControl(GL_UPPER_LEFT, GL_NEGATIVE_ONE_TO_ONE); + glClipControl(GL_UPPER_LEFT, GL_ZERO_TO_ONE); glPointParameteri(GL_POINT_SPRITE_COORD_ORIGIN, GL_UPPER_LEFT); return true; @@ -1980,6 +1980,9 @@ CommandProcessor::UpdateStatus CommandProcessor::UpdateViewportState() { float vpy = -2560.0f * window_height_scalar + window_offset_y; glViewportIndexedf(0, vpx + texel_offset_x, vpy + texel_offset_y, vpw, vph); } + float voz = vport_zoffset_enable ? regs.pa_cl_vport_zoffset : 0; + float vsz = vport_zscale_enable ? regs.pa_cl_vport_zscale : 1; + glDepthRangef(voz, voz + vsz); return UpdateStatus::kMismatch; }