The pitches of the driRenderbuffers are in bytes, so no need to multiply by cpp.
authorEric Anholt <anholt@FreeBSD.org>
Thu, 30 Mar 2006 22:44:51 +0000 (22:44 +0000)
committerEric Anholt <anholt@FreeBSD.org>
Thu, 30 Mar 2006 22:44:51 +0000 (22:44 +0000)
Fixes software fallbacks. (Keith Packard)

src/mesa/drivers/dri/i915/intel_span.c

index a0f848f7b0ebc1c9140e76af337f18f59e7431e0..c3ffc4b2ac0553bbad8e1fc08b0d6c334ada3c45 100644 (file)
@@ -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 +                   \