diff options
author | Dave Airlie <[email protected]> | 2009-02-10 23:36:28 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2009-02-10 23:36:28 +1000 |
commit | c3ca94bc9115f0f328327f1e96fac84b87d5efd5 (patch) | |
tree | f17e6c540bcb939995e9f6ae351f2f339bc6b71e /src/mesa/drivers/dri/radeon | |
parent | b1df5ed6db4d79de895e37bcdd12dfbaae7bd4f6 (diff) |
radeon: fix fallback case where t->mt is valid NULL
Diffstat (limited to 'src/mesa/drivers/dri/radeon')
-rw-r--r-- | src/mesa/drivers/dri/radeon/common_misc.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/radeon/common_misc.c b/src/mesa/drivers/dri/radeon/common_misc.c index 82cead1a25a..4770c987c87 100644 --- a/src/mesa/drivers/dri/radeon/common_misc.c +++ b/src/mesa/drivers/dri/radeon/common_misc.c @@ -1469,8 +1469,9 @@ void radeonMapTexture(GLcontext *ctx, struct gl_texture_object *texObj) radeonTexObj* t = radeon_tex_obj(texObj); int face, level; - // assert(texObj->_Complete); - assert(t->mt); + /* for r100 3D sw fallbacks don't have mt */ + if (!t->mt) + return; radeon_bo_map(t->mt->bo, GL_FALSE); for(face = 0; face < t->mt->faces; ++face) { @@ -1484,8 +1485,9 @@ void radeonUnmapTexture(GLcontext *ctx, struct gl_texture_object *texObj) radeonTexObj* t = radeon_tex_obj(texObj); int face, level; - // assert(texObj->_Complete); - assert(t->mt); + /* for r100 3D sw fallbacks don't have mt */ + if (!t->mt) + return; for(face = 0; face < t->mt->faces; ++face) { for(level = t->mt->firstLevel; level <= t->mt->lastLevel; ++level) |