Browse Source

Clean-up in I830AllocVidMem(), s/int/unsigned long/ for ret variable.

tags/mesa_7_0
Brian 18 years ago
parent
commit
516259d609

+ 14
- 13
src/mesa/drivers/dri/i915/server/intel_dri.c View File

@@ -455,12 +455,14 @@ static unsigned long AllocFromAGP(const DRIDriverContext *ctx, I830Rec *pI830, l
}

unsigned long
I830AllocVidMem(const DRIDriverContext *ctx, I830Rec *pI830, I830MemRange *result, I830MemPool *pool, long size, unsigned long alignment, int flags)
I830AllocVidMem(const DRIDriverContext *ctx, I830Rec *pI830,
I830MemRange *result, I830MemPool *pool, long size,
unsigned long alignment, int flags)
{
int ret;
unsigned long ret;

if (!result)
return 0;
if (!result)
return 0;

/* Make sure these are initialised. */
result->Size = 0;
@@ -470,16 +472,15 @@ I830AllocVidMem(const DRIDriverContext *ctx, I830Rec *pI830, I830MemRange *resul
return 0;
}

if (pool->Free.Size < size)
return AllocFromAGP(ctx, pI830, size, alignment, result);
else
{
ret = AllocFromPool(ctx, pI830, result, pool, size, alignment, flags);

if (ret==0)
return AllocFromAGP(ctx, pI830, size, alignment, result);
return ret;
if (pool->Free.Size < size) {
ret = AllocFromAGP(ctx, pI830, size, alignment, result);
}
else {
ret = AllocFromPool(ctx, pI830, result, pool, size, alignment, flags);
if (ret == 0)
ret = AllocFromAGP(ctx, pI830, size, alignment, result);
}
return ret;
}

static Bool BindAgpRange(const DRIDriverContext *ctx, I830MemRange *mem)

+ 14
- 13
src/mesa/drivers/dri/i915tex/server/intel_dri.c View File

@@ -483,12 +483,14 @@ static unsigned long AllocFromAGP(const DRIDriverContext *ctx, I830Rec *pI830, l
}

unsigned long
I830AllocVidMem(const DRIDriverContext *ctx, I830Rec *pI830, I830MemRange *result, I830MemPool *pool, long size, unsigned long alignment, int flags)
I830AllocVidMem(const DRIDriverContext *ctx, I830Rec *pI830,
I830MemRange *result, I830MemPool *pool, long size,
unsigned long alignment, int flags)
{
int ret;
unsigned long ret;

if (!result)
return 0;
if (!result)
return 0;

/* Make sure these are initialised. */
result->Size = 0;
@@ -498,16 +500,15 @@ I830AllocVidMem(const DRIDriverContext *ctx, I830Rec *pI830, I830MemRange *resul
return 0;
}

if (pool->Free.Size < size)
return AllocFromAGP(ctx, pI830, size, alignment, result);
else
{
ret = AllocFromPool(ctx, pI830, result, pool, size, alignment, flags);

if (ret==0)
return AllocFromAGP(ctx, pI830, size, alignment, result);
return ret;
if (pool->Free.Size < size) {
ret = AllocFromAGP(ctx, pI830, size, alignment, result);
}
else {
ret = AllocFromPool(ctx, pI830, result, pool, size, alignment, flags);
if (ret == 0)
ret = AllocFromAGP(ctx, pI830, size, alignment, result);
}
return ret;
}

static Bool BindAgpRange(const DRIDriverContext *ctx, I830MemRange *mem)

Loading…
Cancel
Save