From: Eric Anholt Date: Thu, 30 Mar 2006 22:44:51 +0000 (+0000) Subject: The pitches of the driRenderbuffers are in bytes, so no need to multiply by cpp. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=aba49671500b4192ea92c658ccaef514407d508b;p=mesa.git The pitches of the driRenderbuffers are in bytes, so no need to multiply by cpp. Fixes software fallbacks. (Keith Packard) --- diff --git a/src/mesa/drivers/dri/i915/intel_span.c b/src/mesa/drivers/dri/i915/intel_span.c index a0f848f7b0e..c3ffc4b2ac0 100644 --- a/src/mesa/drivers/dri/i915/intel_span.c +++ b/src/mesa/drivers/dri/i915/intel_span.c @@ -43,7 +43,7 @@ intelContextPtr intel = INTEL_CONTEXT(ctx); \ __DRIdrawablePrivate *dPriv = intel->driDrawable; \ driRenderbuffer *drb = (driRenderbuffer *) rb; \ - GLuint pitch = drb->pitch * drb->cpp; \ + GLuint pitch = drb->pitch; \ GLuint height = dPriv->h; \ char *buf = (char *) drb->Base.Data + \ dPriv->x * drb->cpp + \ @@ -55,7 +55,7 @@ intelContextPtr intel = INTEL_CONTEXT(ctx); \ __DRIdrawablePrivate *dPriv = intel->driDrawable; \ driRenderbuffer *drb = (driRenderbuffer *) rb; \ - GLuint pitch = drb->pitch * drb->cpp; \ + GLuint pitch = drb->pitch; \ GLuint height = dPriv->h; \ char *buf = (char *) drb->Base.Data + \ dPriv->x * drb->cpp + \ @@ -133,7 +133,7 @@ do { \ intelContextPtr intel = INTEL_CONTEXT(ctx); \ __DRIdrawablePrivate *dPriv = intel->driDrawable; \ driRenderbuffer *drb = (driRenderbuffer *) rb; \ - GLuint pitch = drb->pitch * drb->cpp; \ + GLuint pitch = drb->pitch; \ GLuint height = dPriv->h; \ char *buf = (char *)drb->Base.Data + \ dPriv->x * drb->cpp + \