st/mesa: use the correct src format in ReadPixels
authorPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Thu, 7 Jan 2021 16:36:03 +0000 (17:36 +0100)
committerPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Wed, 13 Jan 2021 08:33:49 +0000 (09:33 +0100)
commit8ecace073ea68e3819ea7c5637bd479067e1420b
treea6a8558bd1d63e746fe2d8be424419b7840f5f64
parenta6fe1eeb058c746da96cb9afae59f4bad7f1fb0c
st/mesa: use the correct src format in ReadPixels

If reading from an FBO that uses a texture view src->format will
be the format of the original texture, not from the view.

Acked-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8387>
src/mesa/state_tracker/st_cb_readpixels.c