mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-18 02:08:23 +02:00
mesa/readpixels: check strides are equal before skipping conversion
The CTS packed_pixels test checks that readpixels doesn't write into the space between rows, however we fail that here unless we check the format and stride match. This fixes all the core mesa problems with CTS packed_pixels tests. Cc: "11.0" <mesa-stable@lists.freedesktop.org> Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
b4a70401f5
commit
32769ac016
1 changed files with 2 additions and 1 deletions
|
|
@ -523,7 +523,8 @@ read_rgba_pixels( struct gl_context *ctx,
|
|||
* convert to, then we can convert directly into the dst buffer and avoid
|
||||
* the final conversion/copy from the rgba buffer to the dst buffer.
|
||||
*/
|
||||
if (dst_format == rgba_format) {
|
||||
if (dst_format == rgba_format &&
|
||||
dst_stride == rgba_stride) {
|
||||
need_convert = false;
|
||||
rgba = dst;
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue