dri/nv04: Align SIFM transfer dimensions.
authorFrancisco Jerez <currojerez@riseup.net>
Wed, 15 Sep 2010 04:09:21 +0000 (06:09 +0200)
committerFrancisco Jerez <currojerez@riseup.net>
Thu, 16 Sep 2010 17:44:21 +0000 (19:44 +0200)
src/mesa/drivers/dri/nouveau/nv04_surface.c

index e3febf7d2f76540bcb7b323e0fbbebc1f10bd00d..9e7dcf0a88f936b0aea681d45e9801ac0cbc08b8 100644 (file)
@@ -255,7 +255,7 @@ nv04_surface_copy_swizzle(GLcontext *ctx,
 
                        BEGIN_RING(chan, sifm,
                                   NV03_SCALED_IMAGE_FROM_MEMORY_SIZE, 4);
-                       OUT_RING(chan, sub_h << 16 | sub_w);
+                       OUT_RING(chan, align(sub_h, 2) << 16 | align(sub_w, 2));
                        OUT_RING(chan, src->pitch  |
                                 NV03_SCALED_IMAGE_FROM_MEMORY_FORMAT_ORIGIN_CENTER |
                                 NV03_SCALED_IMAGE_FROM_MEMORY_FORMAT_FILTER_POINT_SAMPLE);