radeon-common: Fix crash in glGetTexImage
authorNicolai Haehnle <nhaehnle@gmail.com>
Sat, 14 Feb 2009 20:43:30 +0000 (21:43 +0100)
committerNicolai Haehnle <nhaehnle@gmail.com>
Sat, 14 Feb 2009 20:46:44 +0000 (21:46 +0100)
commit7d19d2768491f4de3b674106e93c24d29712404f
treeb1a5404701fac69f541820ac64077986b00194df
parent2d9471b28159b9af952c6a87868ff648a6055c55
radeon-common: Fix crash in glGetTexImage

Since texture images are now stored in miptrees, we cannot usually
access them directly via the Data pointer.

So we wrap Mesa's implementation by map/unmap calls.

This crash was triggered by Sauerbraten, Piglit now contains a
regression test.

Signed-off-by: Nicolai Haehnle <nhaehnle@gmail.com>
src/mesa/drivers/dri/r200/r200_tex.c
src/mesa/drivers/dri/r300/r300_tex.c
src/mesa/drivers/dri/radeon/radeon_tex.c
src/mesa/drivers/dri/radeon/radeon_texture.c
src/mesa/drivers/dri/radeon/radeon_texture.h