mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-17 00:58:13 +02:00
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>
This commit is contained in:
parent
a6fe1eeb05
commit
8ecace073e
1 changed files with 1 additions and 1 deletions
|
|
@ -452,7 +452,7 @@ st_ReadPixels(struct gl_context *ctx, GLint x, GLint y,
|
|||
|
||||
/* Convert the source format to what is expected by ReadPixels
|
||||
* and see if it's supported. */
|
||||
src_format = util_format_linear(src->format);
|
||||
src_format = util_format_linear(strb->Base.Format);
|
||||
src_format = util_format_luminance_to_red(src_format);
|
||||
src_format = util_format_intensity_to_red(src_format);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue