Commit ff8ef975 authored by Eric Anholt's avatar Eric Anholt

glamor: Fix rendering when core font texture allocation fails.

Signed-off-by: 's avatarEric Anholt <eric@anholt.net>
Reviewed-by: 's avatarMichel Dänzer <michel.daenzer@amd.com>
parent a6b05d10
......@@ -127,8 +127,13 @@ glamor_font_get(ScreenPtr screen, FontPtr font)
}
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
glamor_priv->suppress_gl_out_of_memory_logging = true;
glTexImage2D(GL_TEXTURE_2D, 0, GL_R8UI, overall_width, overall_height,
0, GL_RED_INTEGER, GL_UNSIGNED_BYTE, bits);
glamor_priv->suppress_gl_out_of_memory_logging = false;
if (glGetError() == GL_OUT_OF_MEMORY)
return NULL;
free(bits);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment