glamor: fallback if font is too large for FBO size.
running xfontsel on haswell here, with a max texture size of 8kx8k, one font wants 9711 height. This fallsback to sw in this case. A proper solution probably involves using an array texture. Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
6dcb73375e
commit
64081d0eac
|
@ -80,6 +80,11 @@ glamor_font_get(ScreenPtr screen, FontPtr font)
|
|||
overall_width = glyph_width_bytes * num_cols;
|
||||
overall_height = glyph_height * num_rows;
|
||||
|
||||
if (overall_width > glamor_priv->max_fbo_size ||
|
||||
overall_height > glamor_priv->max_fbo_size) {
|
||||
/* fallback if we don't fit inside a texture */
|
||||
return NULL;
|
||||
}
|
||||
bits = malloc(overall_width * overall_height);
|
||||
if (!bits)
|
||||
return NULL;
|
||||
|
|
Loading…
Reference in New Issue