radeon/r200/r300: set correct row stride for rbs
authorDave Airlie <airlied@redhat.com>
Wed, 25 Mar 2009 07:59:33 +0000 (17:59 +1000)
committerDave Airlie <airlied@redhat.com>
Thu, 26 Mar 2009 03:24:21 +0000 (13:24 +1000)
src/mesa/drivers/dri/r200/r200_texstate.c
src/mesa/drivers/dri/r300/r300_texstate.c
src/mesa/drivers/dri/radeon/radeon_texstate.c

index 2212fe64a6d711787e2f7258dcb33ecb85b48644..72b7f3dafa2c771e7772ecbda487322d4ab0ceb5 100644 (file)
@@ -836,6 +836,7 @@ void r200SetTexBuffer2(__DRIcontext *pDRICtx, GLint target, GLint glx_texture_fo
        fprintf(stderr,"settexbuf %d %dx%d@%d\n", rb->pitch, rb->width, rb->height, rb->cpp);
        _mesa_init_teximage_fields(radeon->glCtx, target, texImage,
                                   rb->width, rb->height, 1, 0, rb->cpp);
+       texImage->RowStride = rb->pitch / rb->cpp;
        texImage->TexFormat = radeonChooseTextureFormat(radeon->glCtx,
                                                        internalFormat,
                                                        type, format);
index d16cf688ed583ef9ffa5f099aded662b638b8514..0c6d092df360ea142837bcaf9f77edab7d596a30 100644 (file)
@@ -451,9 +451,10 @@ void r300SetTexBuffer2(__DRIcontext *pDRICtx, GLint target, GLint glx_texture_fo
                radeon_miptree_unreference(rImage->mt);
                rImage->mt = NULL;
        }
-       fprintf(stderr,"settexbuf %dx%d@%d targ %x format %x\n", rb->width, rb->height, rb->cpp, target, format);
+       fprintf(stderr,"settexbuf %dx%d@%d %d targ %x format %x\n", rb->width, rb->height, rb->cpp, rb->pitch, target, format);
        _mesa_init_teximage_fields(radeon->glCtx, target, texImage,
                                   rb->width, rb->height, 1, 0, rb->cpp);
+       texImage->RowStride = rb->pitch / rb->cpp;
        texImage->TexFormat = radeonChooseTextureFormat(radeon->glCtx,
                                                        internalFormat,
                                                        type, format);
index 9931f01b63629c4ccd2dff4c8e611ada67d32443..dab0df0ff3bf17e836c8ea7628f516e483bbccfd 100644 (file)
@@ -707,6 +707,7 @@ void radeonSetTexBuffer2(__DRIcontext *pDRICtx, GLint target, GLint glx_texture_
        }
        _mesa_init_teximage_fields(radeon->glCtx, target, texImage,
                                   rb->width, rb->height, 1, 0, rb->cpp);
+       texImage->RowStride = rb->pitch / rb->cpp;
        texImage->TexFormat = radeonChooseTextureFormat(radeon->glCtx,
                                                        internalFormat,
                                                        type, format);