From 3ca7c1fe42f68db32cebf32f0aaf84c6f2c55cb2 Mon Sep 17 00:00:00 2001 From: espes Date: Tue, 14 Jul 2015 02:38:24 +1000 Subject: [PATCH] ymax instead of ymin for clip seems to work better --- hw/xbox/nv2a.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/xbox/nv2a.c b/hw/xbox/nv2a.c index 096d8548e2..78bbdf92f4 100644 --- a/hw/xbox/nv2a.c +++ b/hw/xbox/nv2a.c @@ -4491,8 +4491,9 @@ static void pgraph_method(NV2AState *d, unsigned int ymax = GET_MASK(pg->regs[NV_PGRAPH_CLEARRECTY], NV_PGRAPH_CLEARRECTY_YMAX); - /* FIXME: Maybe "pg->surface_shape.clip_height-ymax" instead of ymin? */ - glScissor(xmin, ymin, xmax-xmin+1, ymax-ymin+1); + /* FIXME: Should this really be inverted instead of ymin? */ + glScissor(xmin, pg->surface_shape.clip_height-ymax, + xmax-xmin+1, ymax-ymin+1); NV2A_DPRINTF("------------------CLEAR 0x%x %d,%d - %d,%d %x---------------\n", parameter, xmin, ymin, xmax, ymax, d->pgraph.regs[NV_PGRAPH_COLORCLEARVALUE]);