mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 01:20:42 -05:00
cogl: Ensure GL_TEXTURE_MAX_LEVEL is set before using it
Just in case it was lower before. So that `upload_subregion_to_gl` is not trying to upload to a disallowed mipmap level. https://gitlab.gnome.org/GNOME/mutter/merge_requests/1003
This commit is contained in:
parent
73ce9c2e81
commit
a3f27dfd89
@ -567,6 +567,8 @@ _cogl_texture_2d_gl_copy_from_bitmap (CoglTexture2D *tex_2d,
|
||||
&gl_format,
|
||||
&gl_type);
|
||||
|
||||
_cogl_texture_gl_maybe_update_max_level (tex, level);
|
||||
|
||||
status = ctx->texture_driver->upload_subregion_to_gl (ctx,
|
||||
tex,
|
||||
src_x, src_y,
|
||||
@ -580,8 +582,6 @@ _cogl_texture_2d_gl_copy_from_bitmap (CoglTexture2D *tex_2d,
|
||||
|
||||
cogl_object_unref (upload_bmp);
|
||||
|
||||
_cogl_texture_gl_maybe_update_max_level (tex, level);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user