From e757bf964f4fd9ddbaa23ebaa47f743725aaf2c5 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Wed, 25 Mar 2009 17:02:32 +1000 Subject: [PATCH] r300: check buffer sizes in non-tcl case + set correct VRAM limits --- src/mesa/drivers/dri/r300/r300_render.c | 3 +++ src/mesa/drivers/dri/radeon/radeon_common.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/r300/r300_render.c b/src/mesa/drivers/dri/r300/r300_render.c index 402d2d76388..829d088033a 100644 --- a/src/mesa/drivers/dri/r300/r300_render.c +++ b/src/mesa/drivers/dri/r300/r300_render.c @@ -490,6 +490,9 @@ static GLboolean r300RunNonTCLRender(GLcontext * ctx, if (!(rmesa->radeon.radeonScreen->chip_flags & RADEON_CHIPSET_TCL)) return GL_TRUE; + if (!r300ValidateBuffers(ctx)) + return GL_TRUE; + return r300RunRender(ctx, stage); } diff --git a/src/mesa/drivers/dri/radeon/radeon_common.c b/src/mesa/drivers/dri/radeon/radeon_common.c index 9f646c4386c..3ce868d2cf3 100644 --- a/src/mesa/drivers/dri/radeon/radeon_common.c +++ b/src/mesa/drivers/dri/radeon/radeon_common.c @@ -1094,7 +1094,7 @@ void rcommonInitCmdBuf(radeonContextPtr rmesa) if (!drmCommandWriteRead(rmesa->dri.fd, DRM_RADEON_GEM_INFO, &mminfo, sizeof(mminfo))) { - radeon_cs_set_limit(rmesa->cmdbuf.cs, RADEON_GEM_DOMAIN_VRAM, mminfo.vram_size); + radeon_cs_set_limit(rmesa->cmdbuf.cs, RADEON_GEM_DOMAIN_VRAM, mminfo.vram_visible); radeon_cs_set_limit(rmesa->cmdbuf.cs, RADEON_GEM_DOMAIN_GTT, mminfo.gart_size); } } -- 2.30.2