From e8d5d47c1a14e1c78484406cf23cb04248774b58 Mon Sep 17 00:00:00 2001 From: Rudolf Cornelissen Date: Tue, 30 Dec 2003 12:32:46 +0000 Subject: [PATCH] fixed NV31 overlay downscaling limiting git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5825 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/add-ons/accelerants/nvidia/Overlay.c | 6 ++++-- src/add-ons/accelerants/nvidia/engine/nv_bes.c | 18 +++++++++++------- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/src/add-ons/accelerants/nvidia/Overlay.c b/src/add-ons/accelerants/nvidia/Overlay.c index c0270114c1..4d8ed173c0 100644 --- a/src/add-ons/accelerants/nvidia/Overlay.c +++ b/src/add-ons/accelerants/nvidia/Overlay.c @@ -1,4 +1,4 @@ -/* Written by Rudolf Cornelissen 05-2002/10-2003 */ +/* Written by Rudolf Cornelissen 05-2002/12-2003 */ /* Note on 'missing features' in BeOS 5.0.3 and DANO: * BeOS needs to define more colorspaces! It would be nice if BeOS would support the FourCC 'definitions' @@ -452,7 +452,9 @@ status_t GET_OVERLAY_CONSTRAINTS /* GeForceFX series have a new BES engine... */ oc->h_scale.min = 0.5; oc->v_scale.min = 0.5; - break; + /* NV31 (confirmed GeForceFX 5600) has NV20A scaling limits! + * So let it fall through... */ + if (si->ps.card_type != NV31) break; default: /* the rest in between... */ oc->h_scale.min = 0.125; diff --git a/src/add-ons/accelerants/nvidia/engine/nv_bes.c b/src/add-ons/accelerants/nvidia/engine/nv_bes.c index 4500aeb112..b661063a65 100644 --- a/src/add-ons/accelerants/nvidia/engine/nv_bes.c +++ b/src/add-ons/accelerants/nvidia/engine/nv_bes.c @@ -1,5 +1,5 @@ /* Nvidia TNT and GeForce Back End Scaler functions */ -/* Written by Rudolf Cornelissen 05/2002-10/2003 */ +/* Written by Rudolf Cornelissen 05/2002-12/2003 */ #define MODULE_BIT 0x00000200 @@ -296,14 +296,16 @@ status_t nv_configure_bes } break; case NV30A: - /* GeForceFX series have a downscaling limit of 0.5 */ - if (hiscalv > (2 << 16)) + /* GeForceFX series have a downscaling limit of 0.5 (except NV31!) */ + if ((hiscalv > (2 << 16)) && (si->ps.card_type != NV31)) { /* (non-inverse) factor too small, set factor to min. valid value */ hiscalv = (2 << 16); LOG(4,("Overlay: horizontal scaling factor too small, clamping at %f\n", (float)65536 / hiscalv)); } - break; + /* NV31 (confirmed GeForceFX 5600) has NV20A scaling limits! + * So let it fall through... */ + if (si->ps.card_type != NV31) break; default: /* the rest has a downscaling limit of 0.125 */ if (hiscalv > (8 << 16)) @@ -422,14 +424,16 @@ status_t nv_configure_bes } break; case NV30A: - /* GeForceFX series have a downscaling limit of 0.5 */ - if (viscalv > (2 << 16)) + /* GeForceFX series have a downscaling limit of 0.5 (except NV31!) */ + if ((viscalv > (2 << 16)) && (si->ps.card_type != NV31)) { /* (non-inverse) factor too small, set factor to min. valid value */ viscalv = (2 << 16); LOG(4,("Overlay: vertical scaling factor too small, clamping at %f\n", (float)65536 / viscalv)); } - break; + /* NV31 (confirmed GeForceFX 5600) has NV20A scaling limits! + * So let it fall through... */ + if (si->ps.card_type != NV31) break; default: /* the rest has a downscaling limit of 0.125 */ if (viscalv > (8 << 16))