summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/radeon
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2010-01-11 13:21:02 +1000
committerDave Airlie <airlied@itt42.(none)>2010-01-11 13:27:14 +1000
commit1294df9ca4ec39f00de3f9d923316f6641c1fb4a (patch)
tree99135cb596314ddb348998a599ddb63ddc04f283 /src/mesa/drivers/dri/radeon
parent4fe51c7447fb260c32754df95a54b62f513cdd6b (diff)
radeon: fix bug in realloc code.
This bug was fixed in libdrm ages ago, port to non-kms
Diffstat (limited to 'src/mesa/drivers/dri/radeon')
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_cs_legacy.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_cs_legacy.c b/src/mesa/drivers/dri/radeon/radeon_cs_legacy.c
index 45b608a1b9..bf46eb8aab 100644
--- a/src/mesa/drivers/dri/radeon/radeon_cs_legacy.c
+++ b/src/mesa/drivers/dri/radeon/radeon_cs_legacy.c
@@ -182,7 +182,7 @@ static int cs_begin(struct radeon_cs_int *cs,
uint32_t tmp, *ptr;
int num = (ndw > 0x3FF) ? ndw : 0x3FF;
- tmp = (cs->cdw + 1 + num) & (~num);
+ tmp = (cs->cdw + ndw + 0x3ff) & (~0x3ff);
ptr = (uint32_t*)realloc(cs->packets, 4 * tmp);
if (ptr == NULL) {
return -ENOMEM;