r200: fix fog coordinate emit
authorAlex Deucher <alexander.deucher@amd.com>
Tue, 17 Jan 2012 22:06:18 +0000 (17:06 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 17 Jan 2012 23:03:28 +0000 (18:03 -0500)
Noticed by dungeon on phoronix:
http://phoronix.com/forums/showthread.php?65408-Radeon-R100-R200-Mesa-Driver-Sees-Attention&p=247018#post247018

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Note: this is a candidate for the stable branches.

src/mesa/drivers/dri/r200/r200_maos_arrays.c

index b62290231b97933914a8ba057a0c20d7e4786cbf..dee730351062418bb4acceabe2e294b1e7118e34 100644 (file)
@@ -83,7 +83,7 @@ static void r200_emit_vecfog(struct gl_context *ctx, struct radeon_aos *aos,
                count = 1;
                aos->stride = 0;
        } else {
-               radeonAllocDmaRegion(rmesa, &aos->bo, &aos->offset, size * 4, 32);
+               radeonAllocDmaRegion(rmesa, &aos->bo, &aos->offset, size * count * 4, 32);
                aos->stride = size;
        }