gl renderer: Ensure texture sizes arent 0

We already ceil() the given float texture sizes here, so if they are
valid, the result should definitely be > 0. Textures with size 0 can't
be properly used, especially not as render targets, where they will
trigger an assertion failure later in a glCheckFramebuffer call.
This commit is contained in:
Timm Bäder 2017-12-09 14:31:10 +01:00
parent 49c7cf36e4
commit 33457b4035

View File

@ -429,6 +429,9 @@ create_texture (GskGLDriver *self,
int width = ceilf (fwidth);
int height = ceilf (fheight);
g_assert (width > 0);
g_assert (height > 0);
if (width >= self->max_texture_size ||
height >= self->max_texture_size)
{