mirror of
https://github.com/brl/mutter.git
synced 2024-11-26 10:00:45 -05:00
tex-driver-gles: Fix subregion uploads without GL_EXT_unpack_subimage
When the GL_EXT_unpack_subimage extension is not available and a subregion of a texture is uploaded then it should first copy the subregion to a newly allocated bitmap. However it was then later still trying to prepare the upload using the original src_x and src_y values which would cause an assertion failure. This patch fixes it to just reset those to zero if the subregion is first copied. Reviewed-by: Robert Bragg <robert@linux.intel.com> (cherry picked from commit 6f9a62db6f846f1d76e3ca16d9d8cdadf82a7009)
This commit is contained in:
parent
4589c6f158
commit
b3f56ccb48
@ -206,6 +206,8 @@ _cogl_texture_driver_upload_subregion_to_gl (CoglContext *ctx,
|
|||||||
src_x, src_y,
|
src_x, src_y,
|
||||||
0, 0, /* dst_x/y */
|
0, 0, /* dst_x/y */
|
||||||
width, height);
|
width, height);
|
||||||
|
|
||||||
|
src_x = src_y = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
slice_bmp = prepare_bitmap_alignment_for_upload (ctx, source_bmp);
|
slice_bmp = prepare_bitmap_alignment_for_upload (ctx, source_bmp);
|
||||||
|
Loading…
Reference in New Issue
Block a user