wined3d: Fix the center offset in get_projection_matrix.
If we have clip control, viewport_miscpart_cc applies both the half pixel offset and the filling convention nudge. We always have integer pixel centers in this <= d3d9-only codepath. Signed-off-by: Stefan Dösinger <stefan@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
d2daa8b902
commit
235908a7a6
|
@ -5550,12 +5550,16 @@ void get_projection_matrix(const struct wined3d_context *context, const struct w
|
||||||
* driver, but small enough to prevent it from interfering with any
|
* driver, but small enough to prevent it from interfering with any
|
||||||
* anti-aliasing. */
|
* anti-aliasing. */
|
||||||
|
|
||||||
|
/* Projection matrices are <= d3d9, which all have integer pixel centers. */
|
||||||
|
if (!(d3d_info->wined3d_creation_flags & WINED3D_PIXEL_CENTER_INTEGER))
|
||||||
|
ERR("Did not expect to enter this codepath without WINED3D_PIXEL_CENTER_INTEGER.\n");
|
||||||
|
|
||||||
clip_control = d3d_info->clip_control;
|
clip_control = d3d_info->clip_control;
|
||||||
flip = !clip_control && context->render_offscreen;
|
flip = !clip_control && context->render_offscreen;
|
||||||
if (!clip_control && d3d_info->wined3d_creation_flags & WINED3D_PIXEL_CENTER_INTEGER)
|
if (!clip_control)
|
||||||
center_offset = 63.0f / 64.0f;
|
center_offset = 63.0f / 64.0f;
|
||||||
else
|
else
|
||||||
center_offset = -1.0f / 64.0f;
|
center_offset = 0.0f;
|
||||||
|
|
||||||
if (context->last_was_rhw)
|
if (context->last_was_rhw)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue